Re: Getting the IP address of a UDP client

2003-01-03 Thread Lee Chin
Hi Mark, I am not using recvfrom... I simply use recv In other words, I create the server UDP socket, listen on a port then enter into a while loop just doing a recv. Now the thing is, many different clients are sending packets to the server, and I need to reply to each of them at a later time, s

Re: Getting the IP address of a UDP client

2003-01-03 Thread Lee Chin
Hi, This is a UDP server ... so I do not use accept, I simply have a server loop that does a "recv" ... So the server does a recvfrom and then a sendto on the same file descriptor... When I try to do an accept, that system call fails because it is not a TCP socket... Thanks Lee --- Elias Athana

Re: Getting the IP address of a UDP client

2003-01-03 Thread Elias Athanasopoulos
On Fri, Jan 03, 2003 at 11:03:20AM -0800, Lee Chin wrote: > I can use getpeername to get the IP address of a > client on a connected TCP socket, but when I have a > UDP client that just sent me a packet, how do I get > the IP address of that UDP client? Forgive me if I have misunderstood you, but

Getting the IP address of a UDP client

2003-01-03 Thread Lee Chin
Hi I can use getpeername to get the IP address of a client on a connected TCP socket, but when I have a UDP client that just sent me a packet, how do I get the IP address of that UDP client? Thanks Lee -- __ Sign-up for your own FREE Perso

Getting the IP address of a UDP client

2003-01-03 Thread Lee Chin
Hi I can use getpeername to get the IP address of a client on a connected TCP socket, but when I have a UDP client that just sent me a packet, how do I get the IP address of that UDP client? Thanks Lee __ Do you Yahoo!? Yahoo! Mail Plus - Powerful.