Static methods

@:noExpr@:value({ ipv6Only : false })staticbind(this:Tcp, addr:SockAddr, ipv6Only:Bool = false):Result<NoData>

Assigns an address to the TCP socket.

@:noExprstaticcloseReset(this:Tcp, callback:(result:Result<NoData>) ‑> Void):Void

Resets the connection.

@:noExprstaticconnect(this:Tcp, addr:SockAddr, callback:(result:Result<NoData>) ‑> Void):Void

Connects to a host.

@:noExprstaticgetPeerName(this:Tcp):Result<SockAddr>

Retrieves the address of the TCP socket's peer.

@:noExprstaticgetSockName(this:Tcp):Result<SockAddr>

Retrieves the address assigned to the TCP socket.

@:noExprstaticinit(loop:Loop, ?domain:AddressFamily):Result<Tcp>

Allocates and initializes a TCP stream.

The stream is not yet connected or listening.

The handle should be cleaned up with eval.luv.Handle.close when no longer needed.

@:noExprstatickeepAlive(this:Tcp, value:Option<Int>):Result<NoData>

Sets the TCP keepalive.

@:noExprstaticnoDelay(this:Tcp):Result<NoData>

Sets TCP_NODELAY.

@:noExprstaticsimultaneousAccepts(this:Tcp, value:Bool):Result<NoData>

Sets simultaneous accept.