TCP: write vs send (& read vs recv)

From: Nimmi Srivastav (nimmi_srivastav_at_yahoo.com)
Date: 11/26/03


Date: 25 Nov 2003 19:39:59 -0800

Hi,

I have a very simple socket program in which a TCP client sends a
message to a TCP server. For some reason, when I use the write()
library call, the server does not receive any message/data from the
client. However, if I substitute the write() library call with the
send() library call, everything works fine. I haven't tried the
return path yet, but I suspect that I'll have to use recv() rather
than read().

Does anyone want to guess what might be happening? What's the
difference between write and send (& read and recv) for TCP sockets?

Regards,
Nimmi



Relevant Pages