[Gllug] OT: Socket Programming

Christian Smith csmith at thewrongchristian.org.uk
Mon Jan 22 14:22:42 UTC 2007


t.clarke uttered:

> Well
>
> I have quite a few udp applications and they all use recv  and reply to
> the originator quite happily.
>
> Offhand I am not sure exactly how I do it, but if you want some specimen 
> code, happy to oblige.


You are probably connected using connect(2). Else, send has no way to 
determine the destination address.

To the OP, you may as well just use recvfrom, else you have no way of 
sending a response back to an arbitrary client. send(2) cannot be used on 
a socket that is not in the connected state.


>
> Tim
>

Christian

--
     /"\
     \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
      X                           - AGAINST MS ATTACHMENTS
     / \
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list