Header file for socket client operations. More...
Go to the source code of this file.
Functions | |
int | get_address (const char *name, int port, struct sockaddr_in *server_addr) |
Resolves the address of the server. | |
int | connect_socket_server (const char *name, int port) |
Connects to a socket server. | |
Header file for socket client operations.
int get_address | ( | const char * | name, |
int | port, | ||
struct sockaddr_in * | server_addr | ||
) |
Resolves the address of the server.
This function resolves the address of the server given its name and port number.
name | The name of the server. |
port | The port number of the server. |
server_addr | A pointer to a sockaddr_in structure where the resolved address will be stored. |
int connect_socket_server | ( | const char * | name, |
int | port | ||
) |
Connects to a socket server.
This function establishes a connection to a socket server given its name and port number.
name | The name of the server. |
port | The port number of the server. |