Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplexed WebSocket - Application level ping/pong support #280

Closed
AdamMagaluk opened this issue Jan 12, 2016 · 2 comments
Closed

Multiplexed WebSocket - Application level ping/pong support #280

AdamMagaluk opened this issue Jan 12, 2016 · 2 comments

Comments

@AdamMagaluk
Copy link
Collaborator

"When using a fully-featured websocket client, sending a ping every now and again to keep the socket open is built-in. However, when working with plain javascript in the browser, that option is not available.

Would be it possible to allow a message along the lines of:

{type: 'keep-alive'}

or

{type: 'ping'}

And a corresponding ack response?"

Also, check the status code error that is returned when type is not valid.

@AdamMagaluk AdamMagaluk changed the title Multiplexed WebSocket - Application ping/pong support Multiplexed WebSocket - Application level ping/pong support Jan 12, 2016
@wooliet
Copy link
Contributor

wooliet commented Jan 13, 2016

(Regarding the "check status code error")

The documentation for error codes says the status is 400 for bad JSON and 405 for an unknown type value.

When I send an unknown type (e.g. "ping"), I do not get the expected 405. The status returned is instead 400.

{"type":"ping"}
{"type":"error","code":400,"timestamp":1452714090158,"message":"Message validation failed."}

@AdamMagaluk
Copy link
Collaborator Author

Implemented in master, will be included in 1.0.0-beta.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants