Websocket client question
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Websocket client question

Threaded View

  1. #1
    Join Date
    Nov 2011
    Posts
    3

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center