-
Suppose you receive a set of buffers on a stream's receive event and want to do further processing asynchronously. You aren't constrained or congested with respect to machine resources, so you don't want the connection to stop receiving additional data (at any cost). However, you also don't want to copy the buffer memory, preferring to have ownership of it until the async processing is done. What's the idiomatic way of achieving this with msquic? At least based on documentation, it seems like the only way to do this is to return a pending status to the receive indicator and then immediately re-enable the stream? edit: to clarify, the "async processing" to be done on received data is some form of I/O that doesn't occupy a core that could otherwise be used for packet processing or other tasks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Looking at Line 750 in f1b6996 ReceiveCallPending without setting ReceiveEnabled to false. However, I'm not sure what other interactions there may be that make this possible or not possible.
|
Beta Was this translation helpful? Give feedback.
-
I would really recommend starting with the current async model we have of:
This doesn't mean we stop processing the stream at the QUIC layer. We'll continue to buffer the received data (up to the current FC window), but just won't give you a new callback until you're done with what you already have. If you don't think that would work, could you explain your scenario a bit more to explain why not? |
Beta Was this translation helpful? Give feedback.
I would really recommend starting with the current async model we have of:
QUIC_STATUS_PENDING
StreamReceiveComplete
This doesn't mean we stop processing the stream at the QUIC layer. We'll continue to buffer the received data (up to the current FC window), but just won't give you a new callback until you're done with what you already have. If you don't think that would work, could you explain your scenario a bit more to explain why not?