home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!munnari.oz.au!manuel!coombs!avalon
- From: avalon@coombs.anu.edu.au (Darren Reed)
- Subject: Re: TCP/IP connections, how does the blocking work?
- Message-ID: <avalon.711995190@coombs>
- Lines: 22
- Sender: news@newshost.anu.edu.au
- Organization: Computer Services Centre, Australian National University
- References: <13700@mindlink.bc.ca>
- Date: 24 Jul 92 16:26:30 GMT
-
- Frank@mindlink.bc.ca (Frank I. Reiter) writes:
-
- >I am considering moving relatively large amounts of data from a fast
- >originating process on one machine, to a relatively slow receiving process on
- >another machine via sockets.
-
- >If the originating process attempts to write a few megabytes more than the
- >receiving process has read, will it block, what causes it to block, and how far
- >ahead is it likely to get before it does block?
-
- >I want to make sure I will not be placing undo stress on the receiving machine
- >by causing it to try to buffer data not yet read by the process it is intended
- >for. Can the receiving machine cause the sending machine to cause the sending
- >process to block?
-
- Yes it can and will block when the receiving buffer's are full.
- On SunOS this is around 4 or 8 kbytes in size by default.
- Use setsockopt and getsockopt to manipulate the buffer sizes using the
- appropriate options (SO_SNDBUF/SO_RCVBUF).
-
- Darren
-