Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/ws-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module.exports = function attachWSS (server) {

console.log('websocket server created')
wss.on('connection', function (ws) {

// HACK: use internal socket object to disable Nagle's algorithm
ws._socket.setNoDelay();

ws.broadcast = function broadcast (data, flags) {
wss.clients.forEach(function bc (client) {
if (client === ws) return
Expand Down