|
socket |
Top Previous Next |
|
The socket function creates a socket that is bound to a specific transport service provider. Sockets created with the socket function are initially unnamed.
Syntax
Parameters family Specifies the protocol family of the created socket. The only value supported is AF_INET which means the Internet Protocol version 4 (IPv4) address family.
type The type specification for the new socket. The following table lists the values supported:
protocol The protocol to be used. The table below lists the values supported:
Return value If no error occurs, socket returns a descriptor referencing the new socket. Otherwise -1 is returned and errno is set to indicate the error.
|