Skip to content

Identifying streams coming from different clients #2829

Answered by anrossi
ZE-Ridge-Run asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
So you're trying to figure out how to tell two connections apart on the server? You'll have to send some data in a stream on each connection which identifies that client to the server, and then store this data in the context pointer you set on the connection, and in the context pointer set on each stream. One way to do this is to have a single context struct for each connection, and then set that context pointer on each stream as well. When the connection is closed, then you free the context struct for the connection.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nibanks
Comment options

@ZE-Ridge-Run
Comment options

Answer selected by nibanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants