Static methods

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

Assigns an address to the TCP socket.

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

Resets the connection.

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

Connects to a host.

staticgetPeerName(this:Tcp):Result<SockAddr>

Retrieves the address of the TCP socket's peer.

staticgetSockName(this:Tcp):Result<SockAddr>

Retrieves the address assigned to the TCP socket.

staticinit(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.

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

Sets the TCP keepalive.

staticnoDelay(this:Tcp, enable:Bool):Result<NoData>

Sets TCP_NODELAY.

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

Sets simultaneous accept.