uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
8.08k stars 574 forks source link

Create Messaging.js #716

Closed Arpit6055 closed 2 years ago

Arpit6055 commented 2 years ago

you can use postman to connect to the WebSocket and connect to "ws://127.0.0.1:5000/ws" You may test the WebSocket server by creating 2 connection instance and then sending message from one of the connection instance in Json format for eg-: { "type" : "CLIENT_MESSAGE", "body" : {"name" : "Arpit Singh"} }

e3dio commented 2 years ago

Bad code, you are using Array of sockets instead of Set. Or better use Map by ws.id

ghost commented 2 years ago

I don't think this example shows anything new