Permalink
Browse files

Store data from `upgrade` event

`upgradeReq` contains all sort of useful information like `url` - URL of
upgraded WebSocket.
  • Loading branch information...
1 parent 0d81138 commit b0dab2b21ac7962b2317433aafc432449d2e051e @mmalecki committed Dec 18, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/WebSocket.js
View
@@ -43,6 +43,11 @@ function WebSocket(address, options) {
});
this._state = 'connecting';
this._isServer = true;
+
+ this.upgradeReq = address[0];
+ this.stream = address[1];
+ this.upgradeHead = address[2];
+
var self = this;
process.nextTick(function() {
upgrade.apply(self, address);

0 comments on commit b0dab2b

Please sign in to comment.