Skip to content

Commit

Permalink
websocket wss implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ttschnz committed Apr 22, 2022
1 parent 9b610b3 commit 30ced5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/apiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class WebSocketConnection {
: config.server;

this.socket = new WebSocket(
`${config.server.socketProtocol}${serverLocation.hostname}:${serverLocation.port}/${config.server.socketPrefix}`
`${this.socketProtocol}${serverLocation.hostname}:${serverLocation.port}/${config.server.socketPrefix}`
);
this.socket.onopen = () => {
let pair: listener | undefined;
Expand Down
2 changes: 0 additions & 2 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const config = {
useSameServer: true,
// which protocol to use to connect to the api (http: or https:)
protocol: "http:",
// which protocol to use for the websocket (ws: or wss:)
socketProtocol: "ws:",
// the hostname of the api server
hostname: "localhost",
// the port to use to connect to the api
Expand Down

0 comments on commit 30ced5a

Please sign in to comment.