java-express icon indicating copy to clipboard operation
java-express copied to clipboard

Websocket support

Open jjzazuet opened this issue 6 years ago • 2 comments

Hi, this looks like a nice alternative to a lot of bloated Java web frameworks, which is awesome.

I'm browsing through the source code, and it looks like the core implementation relies on the JDK's built-in http server code base com.sun.net.httpserver. Is it possible to either configure Websocket support via java-express? Or can that be achieved by talking to the HttpServer jdk implementation directly?

Thanks!

jjzazuet avatar Jan 08 '20 23:01 jjzazuet

java-express is only made for the purpose as http-server, but I can recommend this implementation of the WebSocket protocol, super easy to use :)

simonwep avatar Jan 09 '20 17:01 simonwep

That WSS library looks nice, thanks!

Quick follow up, looking into the source of Java-WebSocket, it also wants to bind to a target InetSocketAddress to serve connection requests. Would you have any thoughts or suggestions on how to coordinate (glue code) between java-express and Java-WebSocket so that websocket connections can be established on a single bound port?

Thanks again!

jjzazuet avatar Jan 09 '20 19:01 jjzazuet