Skip to content

How can I distinguish between different streams #2590

Answered by nibanks
AvatarGanymede asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can query the ID of each stream via QUIC_PARAM_STREAM_ID.

    QUIC_UINT62 ID;
    uint32_t IDLen = sizeof(ID);
    MsQuic->GetParam(
        StreamHandle,
        QUIC_PARAM_STREAM_ID,
        &IDLen,
        &ID);

It's also worth noting that you can only query a stream's ID after it has been started; meaning just calling StreamOpen is not enough. When you receive a stream from the peer, it is already started.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AvatarGanymede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants