michaelfranzl / socket.io-bridge

Isomorphic library for real-time, bidirectional, event-based communication between two Socket.IO clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feture request: "MAX_NUM_BRIDGES" as an argument

ari-ada opened this issue · comments

Hi.
Would it be possible to set the "MAX_NUM_BRIDGES" as an argument?
Also it would be very handy to have incoming client1 report its ID to the server so that client2 would make a connection having client1 ID passed from the server.

Great work, Thank you!

Hi! Sorry for the late reply.

I just published v1.0.0. See: https://github.com/michaelfranzl/socket.io-bridge/releases/tag/v1.0.0

To your questions:

Would it be possible to set the "MAX_NUM_BRIDGES" as an argument?

The MAX_NUM_BRIDGES limitation has been completely removed; use the connection event from the Socket.IO namespace to implement custom limitations as needed in your own application.

Also it would be very handy to have incoming client1 report its ID to the server so that client2 would make a connection having client1 ID passed from the server.

I'm not completely sure what you mean. All clients report their ID to the server. If client B requests client A, then client B already knows the ID of client A. If you want that client A knows the ID of client B, then you can simply implement it like this: Have client B send its own ID as part of a custom handshake protocol. But then, I'm not sure what the benefit of this is; because each connection between two clients is bi-directional anyway.

I'll close this issue; feel free to re-open it.