Permalink
Browse files

Added `headers` event to `Server`.

  • Loading branch information...
1 parent 41084f1 commit 2463f85f8180e1bcc6ffdf49d9481efaa1074033 @rauchg rauchg committed Jul 3, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/WebSocketServer.js
View
@@ -196,6 +196,9 @@ function handleHybiUpgrade(req, socket, upgradeHead, cb) {
headers['Sec-WebSocket-Protocol'] = protocol;
}
+ // allows external modification/inspection of handshake headers
+ self.emit('headers', headers);
+
socket.setTimeout(0);
socket.setNoDelay(true);
try {

0 comments on commit 2463f85

Please sign in to comment.