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
Server creates the socket with a receive callback, and event types SCTP_REMOTE_ERROR, SCTP_SHUTDOWN_EVENT, SCTP_PARTIAL_DELIVERY_EVENT, SCTP_SENDER_DRY_EVENT.
Server binds, waits for data.
Client sends a message, disconnects.
Server's receive callback is called.
Observed:
In the call to the receive callback, the data is NULL (and therefore any info about the notification), and the address is memset to all 0s.
Expected:
The receive callback gets usable data that it can act upon, like notification data and peer address.
Does the server get the message sent by the client before the receive callback with NULL fires? I'm expecting to see a NULL as the last thing happening (like a recv() would return 0).
Yes, the message is fully received, no problems there. If this is expected behavior, I can certainly handle it, but I wasn't sure if the code I was looking at does what it does intentionally.
You need an indication that you will not receive anything further. In the socket API, the recv() call returns 0. We model this by also providing 0 in the length and the NULL pointer for the data. That is expected and allows you to do cleanup if needed.
How to reproduce:
Observed:
In the call to the receive callback, the data is NULL (and therefore any info about the notification), and the address is memset to all 0s.
Expected:
The receive callback gets usable data that it can act upon, like notification data and peer address.
Notes:
The text was updated successfully, but these errors were encountered: