TooTallNate / Java-WebSocket

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

Multiple WebSocketClients in one thread #1366

Closed popov-aa closed 7 months ago

popov-aa commented 8 months 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 7 months 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 7 months ago

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

HePingLaoSan commented 7 months 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?