Ende.TcpConn
interface
interface Ende.TcpConn extends Conn<NetAddr>A TCP stream connection.
Methods
setNoDelay
setNoDelay(noDelay?: boolean): voidSets the TCP_NODELAY option on this connection, which controls whether
Nagle's algorithm is used.
Note that the boolean is noDelay, not "enable Nagle", so the sense is
the opposite of enabling the algorithm:
setNoDelay(true)(the default) setsTCP_NODELAY, which disables Nagle's algorithm. Small writes are sent immediately with lower latency, at the cost of potentially more, smaller packets.setNoDelay(false)clearsTCP_NODELAY, which enables Nagle's algorithm. Small writes may be buffered and coalesced to reduce the number of packets sent.
noDelay?: booleanWhen
true, disables Nagle's algorithm.
setKeepAlive
setKeepAlive(keepAlive?: boolean): voidEnable or disable TCP keep-alive probes on this connection. Pass true
to enable keep-alive and false to disable it.