Skip to content

Why does socket.ack always send back an array? #271

Answered by Totodore
JasterV asked this question in Q&A
Discussion options

You must be logged in to vote

It might be a miscomprehension, but according to the protocol an ack packet is always encoded as an array:
https://socket.io/docs/v4/socket-io-protocol/#acknowledgement-1

However it should be de-encoded as a single element in the frontend if you provided only one element.
It would be worth to check the encoding code for ack packet in the official implementation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Totodore
Comment options

Answer selected by JasterV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants