|
-
February 12th, 2008, 01:57 PM
#1
Using x receive and send sockets + IOCP
Hi all,
Im currently working on a new version of my client application who´s sole purpose is to query massive ammounts of servers for there status. All data for this subject will be transfered over UDP.
Basicly it goes like this: I send the request and The server responses with 1 or more packets.
Now before i start designed the application i was hoping anyone of you could tell me if it is possible to use a specific ammount of sockets who listen for incoming data from any random source?
I know this is possible when creating a server application since then your can listen to a given port and the client always have to send there requests to that port. however when creating a client, my send sockets send the data through their own port and the servers send their responses back to that port. Is it possible to modify the send in that way that the senders port will be the one used by a receiver socket?
Thanks in advance!
Koen
-
February 12th, 2008, 02:15 PM
#2
Re: Using x receive and send sockets + IOCP
Do you have control of the server code? If so, you can always piggyback a port number on the query of the port you'd like the response to use.
If not, then---assuming I'm understanding the question---it should certainly be possible to specify the client port used, rather than letting it be assigned randomly as usually happens.
-
February 12th, 2008, 05:45 PM
#3
Re: Using x receive and send sockets + IOCP
 Originally Posted by DV6
.... Is it possible to modify the send in that way that the senders port will be the one used by a receiver socket?
What benefit do you hope to obtain by doing so?
Mike
-
February 13th, 2008, 08:54 AM
#4
Re: Using x receive and send sockets + IOCP
When you receive a UDP datagram you can check from which IP address and port number it came and use that information to send the answer back to where the initial datagram came from.
Is that what you are looking for?
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
|