You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a websocket client (through the browser implementation of WebSocket) that will upload small files in the range of 10-100kb. My server is using a nopoll listening socket with GLib event loop to receive complete messages through nopoll_comm_get_msg() on socket activity. When my client sends a message of some significant size, the TCP segments exchanged may be broken into anything between 2 and 12 packets. However, as exemplified by this wireshark TCP dump it is only sent as a single websocket fragment.
NOTE: The wireshark dump and log here is not the same occurrence. Only included the wireshark dump for sake of argument.
In this case, nopoll was able to read 28952 out of 32393 payload bytes from the socket in the first noPollMsg, and was able to read the remaining 3441 bytes in the next noPollMsg, however; the is_final flag is incorrectly set in the first noPollMsg while there are pending payload bytes left to complete the websocket message.
Hhowever, this was commented out in commit 4bc7339, which is seemingly unrelated to the commit itself.
After reverting the change and commenting in the clearing of this flag, I successfully received two noPollMsg objects for this fragment, where the first noPollMsg had is_final cleared.
The text was updated successfully, but these errors were encountered:
I have a websocket client (through the browser implementation of WebSocket) that will upload small files in the range of 10-100kb. My server is using a nopoll listening socket with GLib event loop to receive complete messages through
nopoll_comm_get_msg()
on socket activity. When my client sends a message of some significant size, the TCP segments exchanged may be broken into anything between 2 and 12 packets. However, as exemplified by this wireshark TCP dump it is only sent as a single websocket fragment.TCP segments:
[4 Reassembled TCP Segments (32401 bytes): #62(8192), #63(8192), #65(8192), #66(7825)]
Hex dump of websocket fragment header:
82 fe 7e 89 56 41 bd 0f
Wireshark text interpretation of fragment header:
This is my nopoll/server log of received noPollMsg objects:
NOTE: The wireshark dump and log here is not the same occurrence. Only included the wireshark dump for sake of argument.
In this case, nopoll was able to read 28952 out of 32393 payload bytes from the socket in the first noPollMsg, and was able to read the remaining 3441 bytes in the next noPollMsg, however; the
is_final
flag is incorrectly set in the first noPollMsg while there are pending payload bytes left to complete the websocket message.This has been taken into account here:
nopoll/src/nopoll_conn.c
Line 3518 in e80b74a
Hhowever, this was commented out in commit 4bc7339, which is seemingly unrelated to the commit itself.
After reverting the change and commenting in the clearing of this flag, I successfully received two noPollMsg objects for this fragment, where the first noPollMsg had is_final cleared.
The text was updated successfully, but these errors were encountered: