Skip to content

Is there anything to do after ‘mg_ws_send(conn, NULL, 0, WEBSOCKET_OP_CLOSE)’? #3017

Discussion options

You must be logged in to vote

Please see our documentation, and follow the guidelines in our tutorials.
https://mongoose.ws/documentation/#websocket
https://mongoose.ws/documentation/#mg_ws_send
Do not think in terms of "replacing this call with that call"; think in terms of "doing this with this new tool"

To send a message, use the proper message type as described in RFC 6455 section 5.6 for data frames. when calling mg_ws_send() or mg_ws_printf()

https://www.rfc-editor.org/rfc/rfc6455#section-5.6

https://www.rfc-editor.org/rfc/rfc6455#section-5.5.1

You are sending a CLOSE. It will CLOSE as you requested.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants