Available on lua
staticnew_tcp():Tcp
@:native("new_tcp")new()
bind(address:String, port:Int):Int
connect(host:String, port:Int, cb:(String, Bool) ‑> Void):Int
getpeername():String
getsockname():Int
keepalive(enable:Bool, ?delay:Int):Int
nodelay(enable:Bool):Int
open(sock:Int):Int
simultaneous_accepts(enable:Bool):Int
write_queue_size():Int
accept(client_stream:Stream):Int
is_readable():Bool
is_writable():Bool
listen(backlog:Int, cb:(String, String) ‑> Void):Int
read_start(cb:(String, String) ‑> Void):Int
read_stop():Int
set_blocking(blocking:Bool):Int
shutdown(?cb:() ‑> Void):Int
try_write(data:StreamData):Int
write(data:StreamData, ?cb:(String, Bool) ‑> Void):Int
write2(data:StreamData, send_handle:Tcp, cb:(String, Bool) ‑> Void):Int
close():Void
fileno():Int
has_ref():Bool
is_active():Bool
is_closing():Bool
recv_buffer_size(size:Int):Int
ref():Void
send_buffer_size(size:Int):Int
unref():Void