Skip to content

Commit 093c01b

Browse files
committed
Version 0.2.2; Save request object in ws property of TFPClient, usefull to retrive connection ip,cookies, etc
1 parent 73ca90a commit 093c01b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/TFPSockets.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class TFPSocketsServer extends TFPBaseEventStream {
110110
super()
111111
this.wss = customwss != null ? customwss : new WebSocket.Server({ server, handleProtocols: (ps, req) => { return protocols } });
112112
this.wss.on('connection', (ws, req) => {
113+
ws.req = req
113114
var client = new TFPSocketsClient(null, null,ws);
114115
this.EventStream.emit('connection', client);
115116
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tfpsockets",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Simple event based websockets wrapper",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)