WebSocket noob...
Anyone have a link to a complete jetty 11/12 example with working secure websocket server/client?
I've followed many separate server examples and client examples but there's always an issue whether its an SSL handshake or frame length error or close no_error EoFException. None of them have a complete example, including all dependencies with versions.
Edit: For the down voters... I realise this a broad question. Feel free point me to a better forum to ask this type of question. I figured asking for a eg. link to a working github project would be better than spamming SO with questions every time I hit a problem with broken examples.
This is an overly broad question.
See https://github.com/jetty/jetty-examples/tree/12.0.x/embedded
Look at either of the Jetty 12 sub-projects
ee10-websocket-jakarta-apiee10-websocket-jetty-apiThese contain the examples you are looking for.
In short, you'll need for the server side ...
ServerConnectorconfigured to support whatever "secure" connection you want (https / wss / http1 / http2 / http3 / etc)WebSocketCreatordepending on chosen technology / APIs) that specifies what path should respond with what websocket endpoint.For the client side you'll need ...
WebSocketClient(of the type appropriate for your chosen websocket technology / API).WebSocketClientto establish the Request parameters.CompletableFuture.get())