Closed EddieChan1993 closed 1 year ago
If you've already consumed all data, then c.buffer
will be empty.
If you've already consumed all data, then
c.buffer
will be empty.
Thanks for your reply. In what scenario would OnTraffic not consume all data in c.buffer? Could you please give me an example?"
If you've already consumed all data, then
c.buffer
will be empty.Thanks for your reply. In what scenario would OnTraffic not consume all data in c.buffer? Could you please give me an example?"
When there are multiple packets in the buffer and the user doesn't unpack all of them and process it, or when there is an incomplete packet at the end of the buffer.
If you've already consumed all data, then
c.buffer
will be empty.Thanks for your reply. In what scenario would OnTraffic not consume all data in c.buffer? Could you please give me an example?"
When there are multiple packets in the buffer and the user doesn't unpack all of them and process it, or when there is an incomplete packet at the end of the buffer.
3ks
Actions I've taken before I'm here
Questions with details
Why do we still need to write the buffer into inboundBuffer after the data has been processed in the OnTraffic function?
Code snippets (optional)