Options for the Net.connect method (TCP version).

Fields

@:optionaloptionalwritable:Null<Bool>

allow writes on this socket (NOTE: Works only when fd is passed)

@:optionaloptionalreadable:Null<Bool>

allow reads on this socket (NOTE: Works only when fd is passed)

port:Int

Port the client should connect to

@:optionaloptionallookup:Null<(String, DnsLookupOptions, DnsLookupCallbackSingle) ‑> Void>

Custom lookup function. Defaults to Dns.lookup.

@:optionaloptionallocalPort:Null<Int>

Local port to bind to for network connections.

@:optionaloptionallocalAddress:Null<String>

Local interface to bind to for network connections.

@:optionaloptionalhost:Null<String>

Host the client should connect to. Defaults to 'localhost'.

@:optionaloptionalfd:Null<Int>

allows you to specify the existing file descriptor of socket.

@:optionaloptionalfamily:Null<DnsAddressFamily>

Version of IP stack. Defaults to 4.

@:optionaloptionalallowHalfOpen:Null<Bool>

If true, then the socket won't automatically send a FIN packet when the other end of the socket sends a FIN packet.

The socket becomes non-readable, but still writable. You should call the end method explicitly. See end event for more information.

Default: false