Skip to content

Commit

Permalink
Version 0.2.2; Save request object in ws property of TFPClient, usefu…
Browse files Browse the repository at this point in the history
…ll to retrive connection ip,cookies, etc
  • Loading branch information
vbaicu committed Feb 13, 2018
1 parent 73ca90a commit 093c01b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/TFPSockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class TFPSocketsServer extends TFPBaseEventStream {
super()
this.wss = customwss != null ? customwss : new WebSocket.Server({ server, handleProtocols: (ps, req) => { return protocols } });
this.wss.on('connection', (ws, req) => {
ws.req = req
var client = new TFPSocketsClient(null, null,ws);
this.EventStream.emit('connection', client);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tfpsockets",
"version": "0.2.1",
"version": "0.2.2",
"description": "Simple event based websockets wrapper",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 093c01b

Please sign in to comment.