X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=sockets.js;h=a1818e09803ab50542f6599d2072b9553d242c98;hp=c3190aa28bb392fd1eaa8b7abbeb85c261f883c3;hb=4b5fe3061829e184f9ad86a13d831eda22d95343;hpb=0cfb593616e766e5f5ed693f52452dc3f6efc8fd diff --git a/sockets.js b/sockets.js index c3190aa2..a1818e09 100644 --- a/sockets.js +++ b/sockets.js @@ -20,6 +20,7 @@ module.exports = function(wss) { // TODO: when relaying to opponent, check readyState, potential setTimeout()? + send opponent (re)disconnect // (resign, newgame, newmove). See https://github.com/websockets/ws/blob/master/lib/websocket.js around line 313 + // TODO: awaiting newmove, resign, newgame :: in memory structure wss.on("connection", (socket, req) => { //const params = new URL("http://localhost" + req.url).searchParams;