home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / protocol / tcpip / 4355 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.7 KB  |  45 lines

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