
1 Feb
2009
1 Feb
'09
9:07 p.m.
2009/2/1 Andrew Coppin
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...)
socket() system call creates a socket (a descriptor) that you can identify. bind() creates an identity for the socket so that applications outside can refer to it (using ip:port); it also enables the kernel to pass the received data to your application. sendto() doesn't require that identity. -- Vimal