Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make distinction between a TcpClient in c#

Tags:

c#

How can I as a server make distinctions between a TcpClient that connects to me? As a Client, do I always have to send a username or something from which the server can know who I am?

like image 233
luca.p.alexandru Avatar asked Nov 13 '22 09:11

luca.p.alexandru


1 Answers

I typicly use data transmited client side to the serve to identify the client. Identifiers i use are :

Lan and Wan ip addresses, computername, username, operating system,

in addition to your comments i would like to suggest creating a client class inside the server that handles variables that have already been transmited by the client so you don't have to resend username and so on

like image 164
Naate Avatar answered Nov 14 '22 22:11

Naate