Example of using a "raw" WebSocket:

var websocket = new WebSocket('ws://localhost:7777/simplepush/websocket';, "push-notification");

The request headers for the above call will look like:

Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: Iw0lVrta3lsBFQ/tBoMlwQ==
Sec-WebSocket-Extensions: x-webkit-deflate-frame
Sec-WebSocket-Version: 13
Sec-WebSocket-Protocol: push-notification

And the response:

Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:http://localhost
Connection:Upgrade
Sec-WebSocket-Accept:pSVxwRuvVgzdC6zLVKzijm8azEo=
Sec-WebSocket-Protocol:push-notification
Upgrade:websocket

There is a ticket to add support for websocket subprotocols for SockJS.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira