Re: sockets and threads...




"barcaroller" <barcaroller@xxxxxxxxx> wrote in message
news:rajvf.41098$X25.917928@xxxxxxxxxxxxxxxxxxxxxxxx

> Are the socket commands (send, sendto, recv, revfrom, ...) on Linux 2.4
> thread-safe?

By what most people usually mean by "thread-safe", yes, they are.
However, all bets are off if you do any of the following:

1) Call 'close' on a socket in one thread while it is (or might be) used
in another thread.

2) Call 'send' from two threads on the same TCP socket.

DS


.