This commit is contained in:
AJ ONeal 2018-07-03 03:30:15 -06:00
rodič e785d9199d
revize 648ed4e4d5
1 změnil soubory, kde provedl 3 přidání a 3 odebrání

Zobrazit soubor

@ -57,9 +57,9 @@ var WebSocket = require('ws');
var ws = new WebSocket.Server({ server: server });
ws.on('connection', function (ws, req) {
// inspect req.headers.authorization (or cookies) for session info
ws.write("[Secure Echo Server] Hello!\nAuth: '" + (req.headers.authorization || '') + "'\n"
+ "Cookie: '" + (req.headers.cookie || '') + "'\n");
ws.on('data', function (data) { ws.write(data); });
ws.send("[Secure Echo Server] Hello!\nAuth: '" + (req.headers.authorization || 'none') + "'\n"
+ "Cookie: '" + (req.headers.cookie || 'none') + "'\n");
ws.on('message', function (data) { ws.send(data); });
});
server.listen(443, function () {