I've been reading the documentation of Jetty 9 and they seemed to have gotten rid of the Jetty Socket Connector. So now we have a general ServerConnector and we "upgrade" and HTTPConnection to a WebSocket connection. I've read the documentation about Socket vs WebSocket (Difference between socket and websocket?) and everything linked in that answer. My question is:
1) How do I do the upgrade from HTTPConnection to WebSocket connection? Could someone provide some sample code please?
2) I'm building a desktop app that connects to the server I am writing as well. I need to simulate a TCP connection, will the WebSocketConnection work for me? I ask this because I mostly hear about WebSockets in the context of Browsers and I want to make sure that it is something that I can use in my client app.
Thank you!