init(protocolFamily:socketType:protocol:socket:)
Initializes the receiver with a previously created local socket.
Declaration
init?(protocolFamily family: Int32, socketType type: Int32, protocol: Int32, socket sock: SocketNativeHandle)Parameters
- family:
The protocol family for the provided socket. Possible values are defined in
<sys/socket.h>, such asAF_LOCAL,AF_INET, andAF_INET6. - type:
The type of the provided socket.
- protocol:
The specific protocol the provided socket uses.
- sock:
The previously created socket.
Return Value
A local socket port initialized with the provided socket.