How to read received data in the sample example on QUIC_STREAM_EVENT_RECEIVE event #4076
-
I am very very new to this library and my question might sound very stupid: Regarding the sample example provided by this library, after receiving data over a stream, the QUIC_STREAM_EVENT_RECEIVE event is triggered in the ServerStreamCallback (precisely here)
my question is: How to read the received data, where is the reference to the buffer where I can find the received data? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You need to look at the typedef struct QUIC_STREAM_EVENT {
QUIC_STREAM_EVENT_TYPE Type;
...
struct {
/* in */ uint64_t AbsoluteOffset;
/* inout */ uint64_t TotalBufferLength;
_Field_size_(BufferCount)
/* in */ const QUIC_BUFFER* Buffers;
_Field_range_(0, UINT32_MAX)
/* in */ uint32_t BufferCount;
/* in */ QUIC_RECEIVE_FLAGS Flags;
} RECEIVE; You'll notice |
Beta Was this translation helpful? Give feedback.
You need to look at the
QUIC_STREAM_EVENT* Event
payload:You'll notice
RECEIVE
has a several different fields to use. Generally,Buffers
andBufferCount
will help you get to the actual data.