6.2.3.3 socket
The socket
function creates a new socket of a specified type and returns
the corresponding socket ID. The API is a synchronous API.
The socket ID is required by most other socket functions and is also passed as an argument to the socket event callback function to identify which socket generated the event.