-
September 9th, 2013, 11:49 PM
#1
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!
Last edited by alikim; September 11th, 2013 at 07:11 AM.
-
September 10th, 2013, 01:20 AM
#2
Re: Websocket client question
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?
Victor Nijegorodov
-
September 11th, 2013, 04:26 AM
#3
Re: Websocket client question
Originally Posted by VictorN
Perhaps, you close the connection in your code?
EDIT: I figured it out.
Last edited by alikim; September 11th, 2013 at 07:09 AM.
-
October 9th, 2013, 10:50 PM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|