Options for creating new Socket object.

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)

@:optionaloptionalfd:Null<Int>

allows you to specify the existing file descriptor of socket.

@: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