Websocket client question
Hi,
I'm trying to make a windows app that connects via websockets.
I create a socket (AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP) using this example
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
and send a handshake header to the test server:
GET / HTTP/1.1
Host: echo.websocket.org
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: XbaSVjzMpuugjiIaTS1SYK8XDEE=
Origin: http://echo.websocket.org
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
In response I get a confirmation from the server:
HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Accept: 3FO+JS5IVEBEOLgEjiwoLSsQfAg=
Server: Kaazing Gateway
Date: Tue, 10 Sep 2013 03:33:01 GMT
immediately followed by a websocket connection close frame, so the socket connection closes right away.
Can anyone please tell me what I might be missing here, what might cause this connection to close and how to keep it alive?
Thank you!
Re: Websocket client question
Quote:
Originally Posted by
alikim
what might cause this connection to close and how to keep it alive?
Perhaps, you close the connection in your code?
Re: Websocket client question
Quote:
Originally Posted by
VictorN
Perhaps, you close the connection in your code?
EDIT: I figured it out.
Re: Websocket client question
I'm trying to make an application in VB (or C#, but preferable VB) that deals with data from a websocket stream. I can't for the life of me get the app to connect to the stream and feed the data. If you have any simple examples I could work off it would be appreciated. Thanks