Compare commits
No commits in common. "36d07c0e97a2f8fbf229f5e3a50dc3c202e47d19" and "1e47627c271760bb99c7f06067bb3cf7da30656a" have entirely different histories.
36d07c0e97
...
1e47627c27
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@ -442,7 +442,7 @@ class Room {
|
|||||||
|
|
||||||
const secureProtocol = window.location.protocol === 'https:'
|
const secureProtocol = window.location.protocol === 'https:'
|
||||||
const protocol = secureProtocol ? 'wss' : 'ws'
|
const protocol = secureProtocol ? 'wss' : 'ws'
|
||||||
const webSocketUrl = `${protocol}://${location.host}/ws`
|
const webSocketUrl = `${protocol}://${location.host}`
|
||||||
console.log('connecting to websocket', webSocketUrl)
|
console.log('connecting to websocket', webSocketUrl)
|
||||||
this.webSocket = new WebSocket(webSocketUrl)
|
this.webSocket = new WebSocket(webSocketUrl)
|
||||||
this.webSocket.onerror = () => showPopup('websocket-connect-failed')
|
this.webSocket.onerror = () => showPopup('websocket-connect-failed')
|
||||||
|
|||||||
@ -17,7 +17,6 @@ function main(): void {
|
|||||||
const webServer = http.createServer((req, res) => {
|
const webServer = http.createServer((req, res) => {
|
||||||
serveHandler(req, res, {
|
serveHandler(req, res, {
|
||||||
public: 'public',
|
public: 'public',
|
||||||
unlisted: ['ws'],
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -31,7 +30,6 @@ function main(): void {
|
|||||||
|
|
||||||
const websocketServer = new websocket.Server({
|
const websocketServer = new websocket.Server({
|
||||||
server: webServer,
|
server: webServer,
|
||||||
path: '/ws',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const broadcastServer = new Server()
|
const broadcastServer = new Server()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user