#include <sent/stddefs.h>
#include <sent/tcpip.h>
Include dependency graph for server-client.c:

Go to the source code of this file.
Functions | |
| int | ready_as_server (int port_num) | 
| int | accept_from (int sd) | 
| Wait for a request from client.   | |
| int | make_connection (char *hostname, int port_num) | 
| int | make_connection_unix (char *address) | 
| int | close_socket (int sd) | 
| void | cleanup_socket () | 
Definition in file server-client.c.
| int ready_as_server | ( | int | port_num | ) | 
Prepare as a server creating a socket for client connection.
| port_num | [in] network port to listen. | 
Definition at line 40 of file server-client.c.
Referenced by adin_tcpip_standby(), and main_module_loop().
| int accept_from | ( | int | sd | ) | 
Wait for a request from client.
This function blocks until a connection request comes.
| sd | [in] listening server socket descpritor | 
Definition at line 116 of file server-client.c.
Referenced by adin_tcpip_begin(), and main_module_loop().
| int make_connection | ( | char * | hostname, | |
| int | port_num | |||
| ) | 
Make a connection to a server.
| hostname | [in] server host (host name or numeric IP address) | |
| port_num | [in] port number | 
Definition at line 161 of file server-client.c.
| int make_connection_unix | ( | char * | address | ) | 
Make a connection to a server using unix domain socket.
| address | [in] unix domain socket address (path) | 
Definition at line 244 of file server-client.c.
| int close_socket | ( | int | sd | ) | 
Close socket.
| sd | [in] socket descriptor to close | 
Definition at line 277 of file server-client.c.
Referenced by adin_tcpip_end(), main_module_loop(), and module_disconnect().
| void cleanup_socket | ( | ) | 
Clean up socket data at program exit.
Definition at line 293 of file server-client.c.
 1.5.0