desired socket type, which specifies the communication semantics. Defaults to SOCK_STREAM.
For Unix Sockets the valid types are:
- SOCK_STREAM, for a stream-oriented socket.
- SOCK_DGRAM, for a datagram-oriented socket that preserves message boundaries (as on most UNIX implemen‐tations, UNIX domain datagram sockets are always reliable and don't reorder datagrams).
- SOCK_SEQPACKET (since Linux 2.6.4), for a connection-oriented socket that preserves message boundaries and delivers messages in the order that they were sent.
The socket descriptor or -1 on error. See the ISocket socket() implementation for details.
Creates a socket endpoint for communication and sets this.fd to the corresponding file descriptor.