Re: sockts and read() write()
From: Dan White
Date: Thu Jun 18 2009 - 18:09:28 EST
ranjith kumar wrote:
Hi,
I am new to socket programming.
There are two programs(client on target machine, server on host
machine ) , communicating through a single socket.
Server program writes data of (say) 100bytes, 200 bytes, 500 bytes and
1000bytes, suceessively calling write() 4 times.
My question is on client side, if I call read() 4 times, will get
100bytes, 200bytes, 500bytes and 1000bytes of data successively and
ALWAYS? Or is it possible that with a single read() I may get all
100+200+500+1000bytes of data???
Where can I find more information about these read() and write()
functions?
Ranjith,
This article is recommended for background information on such topics:
http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html
- Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html