|
-
Mar 19th, 2004, 12:26 PM
#1
Thread Starter
Lively Member
Identifying Clients
Hello Everybody:
I have created a multithreaded client server application...The server can received 50 client connections by creating new threads..The client uses there name and phone number as parameters to connect to the server...
Now I want to send the information back to the same client
from the server. My problem is identifying the correct client and sending the information to the correct client.
I am identifying the client by using the GetHashCode method
which will be generated by the name and phone number the client uses to login to the server.
Now my problem is how do I use the Hashcode method which will be unique when I sent the information to the correct client..
The code used to sent data to the client is as follows:
try
{
Object objData = txtDataTx.Text;// the text box contains the data to be send....
{
byte[] byData = System.Text.Encoding.ASCII.GetBytes(objData.ToString ());
m_socWorker.Send (byData);
}
}
catch(SocketException se)
{
MessageBox.Show (se.Message );
}
txtDataTx.Text="";
I hope you guys can help me.I am stuck on this point..
THanks,
Kapil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|