|
-
Apr 16th, 2005, 07:04 PM
#14
Re: Multithread Multiuser UDP Winsock Client/Server
How will the server know that a "coordinate arrives from client1" ??? How will it know its not from client2?
You could handle this in a couple ways.
The server can check the RemoteHostIP when a message arrives to see who is sending the message.
Or, as part of the message sent to the server the client could include a predetermined ID number.
Another thing you could do is:
Client sends initialization message to server
server responds with unique port number, loads new winsock control bound to that port number
client uses this new port number for sending it's coordinates
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
|