home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.tcp-ip
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!spool.mu.edu!yale.edu!think.com!linus!philabs!add
- From: add@philabs.philips.com (Aninda V. Dasgupta)
- Subject: Setting socket send and receive buffer sizes
- Message-ID: <1992Sep9.160921.20771@philabs.philips.com>
- Sender: news@philabs.philips.com (Mr. C. News)
- Organization: Philips Laboratories, Briarcliff, New York
- Date: Wed, 9 Sep 1992 16:09:21 GMT
- Lines: 34
-
- I am writing a TCP server and a client under SunOS.
- I have four questions :
-
- 1) Most of my transfers are about 40-60 bytes in size.
- However, one in about 10 transfers is a quarter of
- a MByte in size (image files). I am setting the
- send and receive buffer sizes in both the client and
- server to be the maximum allowed, viz. 52,000 bytes.
- Will this affect the throughput for the smaller (and
- more frequent) 60 byte packets?
-
- 2) In the server, is it absolutely necessary to call
- the setsockopt() function right after the socket() call?
- Or can I wait till after the bind() call to set the send
- and receive buffer sizes?
-
- 3) What about new connections accepted by the server? Do
- I have to set the buffer sizes for all the fd's that
- are returned by the accept() call?
- (I suspect that the buffer sizes are exchanged between
- client and server during connection setup.)
-
- 4) In the client, can I wait till after the connect() to
- set the buffer sizes or do I have to do it right after
- the socket() call ?
-
- Any help will be greatly appreciated. Thanks in advance.
-
- Aninda
- --
- Aninda DasGupta (add@philabs.philips.com)
- Ph : (914) 945-6071 Fax : (914) 945-6552
- Philips (No, we don't produce Gas, we make lightbulbs) Labs.
- 345 Scarborough Road\n Briarcliff Manor\n NY 10510
-