Sending connection request to server with data!

  • Thread starter Thread starter Hamed_1983
  • Start date Start date
H

Hamed_1983

Guest
Hi

i'm using System.Net.Sockets.TcpClient & System.Net.Sockets.TcpListener to communicate client(s) / server. here is my sample code in client side :

this._tcpClient.Connect(this._serverEndpoint);

And here is my server side code to accept incoming connection request :

TcpClient client = this._tcpListener.AcceptTcpClient();

This code works good, but i want have a custom class which hold more data such as ConnectionID, ChatID, etc.

I want to get this data when server accept incoming connection request, but as u know the 'AcceptTcpClient' method return only 'TcpClient' object and i can't add some data to this object.

Can anybody help me how to accomplish this task ?

Thanks in advance.




Database Helper v 2.0.0

Continue reading...
 

Similar threads

P
Replies
0
Views
176
Policy standard local admin account with Active Di
P
Back
Top