Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Websockets and threading

Hi,

I want to give an existing application that already uses a NIO
selector pattern the ability to periodically post data to clients over
web sockets. The code seems straightforward enough. Just inheriting a
web socket handler and storing all of the connections. What I've been
trying to find out is how Jetty is threaded and if it's safe to call
WebSocket.Connection SendMessage from a thread which is not managed by
Jetty. I suppose one option would be to somehow get the existing code
and Jetty to use the same selector. Data is only flowing out of the
application and not into it if that makes any difference.

Best regards,
Gunnar Kristjansson


Back to the top