View source
abstract Tcp
package eval.luv
to Handle, Stream, TStream<Tcp>, SocketHandle
Available on macro
Static methods
staticbind(this:Tcp, addr:SockAddr, ipv6Only:Bool = false):Result<NoData>
Assigns an address to the TCP socket.
staticconnect(this:Tcp, addr:SockAddr, callback:(result:Result<NoData>) ‑> Void):Void
Connects to a host.
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.