A socket is two way. There is a client and a server. If the server doesn't handle the websocket requests then the server does not support it regardless of whether the client does.
right. the server is the app in this instance. the app needs to handle the websocket upgrade request, nobody else. that's my question: where does the host enter in this equation? they are only running the app.
let me rephrase. Eg in node if you want to listen on a certain port you set it right? What if the host has that port blocked? OR just blocks all ports except for 80 and 443 for example. I guess that's what i meant by "configure".
I think the original question is going over people’s heads - why are people letting Google have this much control over their client code? You’re letting Google dictate a huge portion of your application’s stack and griping about how web sockets are hard to use. But you can run websockets on just about any mom and pop ISP that lets you run Apache or a container. It’s not hard.
The httpd needs to support it though, not the 'app'.
i do not know what "httpd" is in this context. The apache web server? tomcat itself? because in my normal plain spring boot application, i start it up, listen on a socket and the underlying server (undertow, tomcat or jetty) just facilitates the servlet framework setup. it is me (well, spring) who listens for the websocket upgrade request on a particular path. whoever is hosting me has absolutely nothing to do with anything. even if I am not running my own websserver, but in a shared tomcat instance, it is still me who gets the websocket upgrade request.
i dont need httpd (whatever that is) to do anything, just move out of the way and let me handle it.
4
u/bausscode Jun 13 '19
A socket is two way. There is a client and a server. If the server doesn't handle the websocket requests then the server does not support it regardless of whether the client does.