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

No way to send data with ping and pong #36

Closed
Tracked by #181
aantron opened this issue Nov 28, 2021 · 1 comment
Closed
Tracked by #181

No way to send data with ping and pong #36

aantron opened this issue Nov 28, 2021 · 1 comment

Comments

@aantron
Copy link

aantron commented Nov 28, 2021

The RFC allows ping and pong frames to have payloads (up to 125 bytes), and requires that a pong for a ping contain the same payload as the ping. However, the current websocket/af API does not allow sending payloads with ping and pong frames:

https://github.com/anmonteiro/websocketaf/blob/248a2cb0dcffa51996c3ad7643577dce75d67454/lib/websocketaf.mli#L151-L152

I actually don't know if ping/pong payloads are used in practice.

aantron added a commit to aantron/dream that referenced this issue Nov 29, 2021
It's not possible to send them at the moment, due to

  anmonteiro/httpun-ws#36

However, this change should be made now to future-proof the Dream API.
@anmonteiro
Copy link
Owner

fixed in #54

aantron added a commit to aantron/dream that referenced this issue Nov 10, 2023
Since anmonteiro/httpun-ws#36 was fixed
recently, websocket/af supports sending ping and pong payloads, as
required by the WebSocket spec. This commit has dream-httpaf using that
support.

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

No branches or pull requests

2 participants