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: 4 comments 14 replies
-
|
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.
-
|
Will one StreamSend on the client side triggers multiple QUIC_STREAM_EVENT_RECEIVE events on the server side? Can we assume the QUIC_STREAM_EVENT.REVCEIVE.TotalBufferLength always indicates the total length of one StreamSend on the client side? |
Beta Was this translation helpful? Give feedback.
-
|
Will QUIC_STREAM_EVENT_RECEIVE events of the same hStream be deliveried on different quic working threads? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
You need to look at the
QUIC_STREAM_EVENT* Eventpayload:You'll notice
RECEIVEhas a several different fields to use. Generally,BuffersandBufferCountwill help you get to the actual data.