C
SOCKET socket( int af, int type, int protocol );
Description
This function creates a new BSD socket for the microchip TCPIP stack. The return socket descriptor is used for the subsequent BSD operations.
Preconditions
BerkeleySocketInit function should be called.
Parameters
Parameters |
Description |
af |
address family - AF_INET. |
type |
socket type SOCK_DGRAM or SOCK_STREAM. |
protocol |
IP protocol IPPROTO_UDP or IPPROTO_TCP. |
Returns
New socket descriptor. INVALID_SOCKET in case of error.
Remarks
None.