I created a system to connect a series of TcpClient to a TcpListener and exchange data in a chat-like system. Once the connection is established, the server adds the client to a List, and starts reading the stream waiting for messages.
Once the server has received a message, is there a build-in method to know which client sent it?
Alternative: I thought of attaching the client's RemoteEndPoint (Ip + port) to the message to use it as an identifier, which should be the same between the two versions of the TcpClient on the client and on the server, and unique compared to the other clients. Am I right?