FiberSelectWriter.cork

Enables or disables the TCP_CORK feature.

Note that, if is enabled, not all data passed to send() may be sent immediately; to force sending pending data, call flush() after send() or set cork_auto_flush to true before calling send().

If enabled is false but the TCP_CORK is currently enabled, pending data will be sent now.

  1. bool cork(bool enabled)
    class FiberSelectWriter
    bool
    cork
    (
    bool enabled
    )
  2. bool cork()

Parameters

enabled bool

true: enable the TCP_CORK feature; false: disable it.

Return Value

Type: bool

enabled

Throws

IOError if the TCP_CORK option cannot be set for the socket. If the socket was not yet created by socket() or accept() then the request will fail with the EBADF "Bad file descriptor" error code.

Meta