[Haskell-cafe] UDP

Manlio Perillo manlio_perillo at libero.it
Mon Feb 2 08:57:01 EST 2009

Andrew Coppin ha scritto:
> [...]
> Yeah, I just assumed that the bind step was only necessary for 
> connection-oriented protocols. (Interestingly enough, the matching 
> "send" program doesn't bind at all, yet seems to work fine...)

For a client (that is, when you call connect), the kernel chooses the 
source IP address once the socket is connected.

Of course, for a server this is not feasible, since the address *must* 
be know to external programs, if they want to connect to the server.

For more details, I really suggest to read a good book like
"UNIX Network Programming", by W. Richard Stevens.

Regards  Manlio Perillo

More information about the Haskell-Cafe mailing list