TooTallNate / Java-WebSocket

A barebones WebSocket client and server implementation written in 100% Java.
http://tootallnate.github.io/Java-WebSocket
MIT License
10.53k stars 2.58k forks source link

Multiple WebSocketClients in one thread #1366

Closed popov-aa closed 1 year ago

popov-aa commented 1 year ago

I need to connect from one application to a hundred websocket servers and receive messages from them. How do I do this, without creating a thread for each client?

PhilipRoman commented 1 year ago

Hi, this is currently not possible without creating many threads. There are no plans to implement this as it would require rewriting most of the client code and we don't have enough contributors :P

I'm closing this as completed, let me know if there is anything I can help with.

popov-aa commented 1 year ago

Thank you. I found solution on c++: https://github.com/zaphoyd/websocketpp

HePingLaoSan commented 1 year ago

Hi, this is currently not possible without creating many threads. There are no plans to implement this as it would require rewriting most of the client code and we don't have enough contributors :P

I'm closing this as completed, let me know if there is anything I can help with.

So, the correct way to use this library is to perform the creation operation of each WebSocket in its own thread, right?