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
It is possible for Seasocks to listen and open multiple connections on more than one port? I am thinking of a scenario where we have, say a data channel on port 1234 and control channel on port 5678.
One way I thought of doing this is creating two server objects (one per channel) and having each do server.serve() on its own thread. The parent of these two threads could send data out using server.execute(connection->send) on each server object?
Is there a better way where I can call listen() and handle simultaneous connections on more than one port?
Thanks for creating a great tool!
-Chris
The text was updated successfully, but these errors were encountered:
I haven't looked in detail, but I think the thread-per-listener approach is probably your best option. Hooking into the event loop isn't very easy (ie requires code modification) as we discussed a bit in #47 .
Hey guys,
It is possible for Seasocks to listen and open multiple connections on more than one port? I am thinking of a scenario where we have, say a data channel on port 1234 and control channel on port 5678.
One way I thought of doing this is creating two server objects (one per channel) and having each do server.serve() on its own thread. The parent of these two threads could send data out using server.execute(connection->send) on each server object?
Is there a better way where I can call listen() and handle simultaneous connections on more than one port?
Thanks for creating a great tool!
-Chris
The text was updated successfully, but these errors were encountered: