locked
Does the MessageWebSocket API supports the concept of extensions?

    Question

  • I am trying to use the MessageWebSocket API to create an application to connect to the WebSocket server. We have the concept of extensions in our WebSocket server that we expect from the client during handshake. As per the RFC6455 spec, a client requests extensions by including a header field Sec-WebSocket-Extensions during handshake and server responds with some or all of the requested extensions using the same header.

    I found a way to set the Sec-WebSocket-Extensions header using setRequestHeader. However I could not find a way to get the extension(s) accepted by the server once the connection is open. Does the current API provides a way to get the extensions negotiated by the server?

    Sunday, March 17, 2013 9:21 AM

Answers

  • The class itself does not expose a property by which you can look at the HTTP response header of the 101 Switching Protocols response that happens during the establishment of the WebSocket.

    Thanks,

    Prashant.

    Tuesday, March 19, 2013 1:33 AM
    Moderator
  • Hi PKhanal,

    Currently there is no workaround. the current implementation of the WebSocket protocol in Windows does not allow you to use extensions that are controlled at an application level.

    Thanks,

    Prashant

    • Marked as answer by pkhanal Sunday, March 24, 2013 3:57 AM
    Friday, March 22, 2013 6:54 PM
    Moderator

All replies

  • The class itself does not expose a property by which you can look at the HTTP response header of the 101 Switching Protocols response that happens during the establishment of the WebSocket.

    Thanks,

    Prashant.

    Tuesday, March 19, 2013 1:33 AM
    Moderator
  • Hi PKhanal,

    Currently there is no workaround. the current implementation of the WebSocket protocol in Windows does not allow you to use extensions that are controlled at an application level.

    Thanks,

    Prashant

    • Marked as answer by pkhanal Sunday, March 24, 2013 3:57 AM
    Friday, March 22, 2013 6:54 PM
    Moderator