HI /dev
 
Sure I'll get it from work tomorrow.
 
Perhaps you can clear this up for me because I'm really confused, this is what I'm thinking at the moment.
 
I think there are two ways to use UDP as such.
 
UDP is connection less - so I don't make a connection.  I can just create a UDP socket and set it to listen for data coming in using recvfrom.  I can then take the sockaddress I get from the recvfrom to send data to the machine that just sent me data using sendto.
 
 
The other way (way I want to do it)
 
You can call bind on the server to associate the socket with a Port No and IP, being a server the IP will usually allow any user to 'connect'.  A client machine can 'connect' to my server to send data.  The remote machine will have a port assigned to it by Windows.
 
Because the sever has called bind to associate the Port No and IP to the socket I can just use send and recv to send data back and fourth.  The client can call connect to connect to my server - this will associated it with a port and IP so I can just call send and recv on the client as well?
 
Regards
Max
 
 

 
I've set-up a system where two applications on separate computers talk to each other using UDP.  I've bound both of them to a port number such as 4010.  I'm then sending data in a full duplex way across them.
Can you post the code that you use to bind to the port?
The thing that's confused me now is a work colleague said they both shouldn't be using the same port.
 
Is he right?
I don't think so but I'd like to check your code first.


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: Mon 21/02/2005
_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to