Identifying streams coming from different clients #2829
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
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.