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
WebSocketTransport::connectToUrl() function is blocking, so connections from multiple WebSocket clients in parallel will be slow.
I think the library should implement async connect mode.
Parallel client connection attempts are supported by the public WebSocket::start() API. Configure one WebSocket per connection, register its callback, and call start() on each instance. Each instance connects on its own background thread; starting the second client does not wait for the first handshake. connect() is the synchronous API.
I verified the concurrent-start/shutdown path on current master with two clients per server over ten rounds under ThreadSanitizer (20 connections, 81 ms total). The threading documentation describes ownership and callback threads; #654 adds the parallel-start guidance explicitly.
Closing this request as supported. A shared event loop with many connections per thread would be a separate scalability feature.
Activity
bsergean commentedon Nov 17, 2026
Parallel client connection attempts are supported by the public
WebSocket::start()API. Configure one WebSocket per connection, register its callback, and callstart()on each instance. Each instance connects on its own background thread; starting the second client does not wait for the first handshake.connect()is the synchronous API.I verified the concurrent-start/shutdown path on current master with two clients per server over ten rounds under ThreadSanitizer (20 connections, 81 ms total). The threading documentation describes ownership and callback threads; #654 adds the parallel-start guidance explicitly.
Closing this request as supported. A shared event loop with many connections per thread would be a separate scalability feature.