|
-
Mar 23rd, 2004, 09:57 AM
#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.
I am storing the information in a hashtable and retriving the information and sending the information.. How it does not seem to work..
Pls guide...
try
{
if ((table.ContainsKey(txtOutput.Text)==true))
{
Object objData = txtDataTx.Text;
byte[] byData = System.Text.Encoding.ASCII.GetBytes(objData.ToString ());
m_socWorker.Send (byData);
}
}
catch(SocketException se)
{
MessageBox.Show (se.Message );
}
statuslabel.Text="";
txtDataTx.Text="";
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
|