#include <string>
Go to the source code of this file.
Defines | |
#define | BACKLOG 30 |
length of the backlog queue for the listening socket | |
Functions | |
int | init_sd_serv (int port, string ip_addr) |
socket descriptor initializer function for servers | |
int | init_sd_cli (int port, string ip_addr) |
socket descriptor initializer function for clients |
#define BACKLOG 30 |
length of the backlog queue for the listening socket
Definition at line 10 of file utility.h.
Referenced by init_sd_serv().
int init_sd_cli | ( | int | port, | |
string | ip_addr | |||
) |
socket descriptor initializer function for clients
this function initializes a socket and connects it with a listening server located at ip_addr:port. if this call is successful, the initialized socket is ready for data transfer
port | | port of the listening server | |
ip_addr | | IP address of the listening server |
Definition at line 42 of file utility.cpp.
References DEB.
int init_sd_serv | ( | int | port, | |
string | ip_addr | |||
) |
socket descriptor initializer function for servers
this function initializes a socket using the port specified as an input parameter. it initializes the socket as a server should do. if this call is successful, the initialized socket is ready for accept()
port | | port on which the server wants to wait for connection | |
ip_addr | | IP address on which the server wants to receive connections |
Definition at line 13 of file utility.cpp.
References BACKLOG, DEB, and listen().
Referenced by main().