So, I\'m trying to parse a website which uses websocket to send data to clients. From what I\'ve read:
I understood that for
Lots of topics here.
Sec-WebSocket-Key
is mentioned many times in RFC6455, it has 1 overall purpose, for the client to prove that it received a valid WebSocket opening handshake from the server. There's rules for the client side, and rules for the server side on what it should do with it, and how it should respond to it. (in short, its a random value that the client picks, sends to the server, the server tacks on RFC specified GUID for this step, calculates an SHA-1 hash, and responds with this hash in its own Sec-WebSocket-Key
, which the client validates to confirm that the server is really WebSocket capable)There are a few JSR-356 standalone clients I'm aware of.
org.eclipse.jetty.websocket
javax-websocket-client-impl
9.1.0.v20131115
org.apache.tomcat
tomcat-websocket
8.0.0-RC5
org.apache.tomcat
tomcat-coyote
8.0.0-RC5
org.glassfish.grizzly
grizzly-websockets
2.3.8
org.glassfish.tyrus.bundles
tyrus-standalone-client
1.3.3
If you do write your own WebSocket client, be sure you test it against the Autobahn WebSocket Protocol Testsuite (everyone who write an implementation tests against this testsuite, its kinda become the de facto protocol validation suite)