chickadee » tcp6 » tcp-buffer-size


Sets the size of the output buffer. By default no output-buffering for TCP output is done, but to improve performance by minimizing the number of TCP packets, buffering may be turned on by setting this parameter to an exact integer greater than zero. For best performance, it should be a power of 2 such as 128, 1024 or 4096. A buffer size of #f turns buffering off. The setting of this parameter takes effect at the time when the I/O ports for a particular socket are created, i.e. when tcp-connect or tcp-accept is called.

See socket-receive-buffer-size and socket-send-size in the socket egg for additional send and receive tuning that can be done with TCP ports. This parameter is itself equivalent to socket-send-buffer-size.

Note that since output is not immediately written to the associated socket, you may need to call flush-output once you want the output to be transmitted. Closing the output port will flush automatically.