You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All events will be sent to `message` listener even if there is another listener sent for those events.
51
+
52
+
conn.on('message', event=> {
53
+
console.log("onMessage received event: ",event)
54
+
})
55
+
```
56
+
45
57
**Send Events**
46
58
47
-
Only supports sending serialisable objects and strings now.
48
-
Binary data support is in progress.
49
59
50
60
```javascript
51
61
conn.send('eventName',{x:0,y:0})
52
62
```
53
63
64
+
**Send Data**
65
+
66
+
```javascript
67
+
conn.sendData('eventName',newUint8Array())
68
+
```
69
+
54
70
Client for browser is build on top of WebSocket javascript object. TFPSocketsClient provides access to base socket object via `ws` property and can also be initialised with a pre initialised WebSocket instance using:
55
71
```javascript
56
72
var client =newTFPSocketsClient(null, null,initialisedWS)
0 commit comments