Creating a Socket (socket)

Creates a socket for network communication.

int socket(int domain, int type, int protocol);

Parameters:

Return Value:

Binding a Socket to an Address (bind)

Associates a socket with a specific local address.

int bind(int sockfd, struct sockaddr *my_addr, int addrlen);

Parameters:

Return Value: