Re: sockts and read() write()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux