Freeciv-3.2
|
Go to the source code of this file.
Macros | |
#define | BUF_SIZE 512 |
#define | SERVER_LAN_PORT 4555 |
#define | SERVER_LAN_TTL 1 |
#define | SERVER_LAN_VERSION 2 |
Enumerations | |
enum | server_events { S_E_END_OF_TURN_TIMEOUT , S_E_OTHERWISE , S_E_FORCE_END_OF_SNIFF } |
Close all network stuff: connections, listening sockets, metaserver connection...
Definition at line 260 of file sernet.c.
Referenced by server_quit().
Attempt to flush all information in the send buffers for upto 'netwait' seconds.
Definition at line 381 of file sernet.c.
Referenced by begin_phase(), dai_do_first_activities(), end_phase(), send_all_known_cities(), send_all_known_tiles(), and send_all_known_units().
void handle_client_heartbeat | ( | struct connection * | pconn | ) |
void handle_conn_pong | ( | struct connection * | pconn | ) |
Initialize connection related stuff. Attention: Logging is not available within this functions!
Definition at line 1366 of file sernet.c.
Referenced by main(), and srv_prepare().
Clear readline stuff at exit. To cater for as many different cases as possible, we call this both like any function call from server_quit() before exit(), and as a atexit handler. Former is to get everything cleared already before exit(), before any other atexit handler comes to play. Latter is to make sure that the function gets called also when in those rare cases where we exit some other way than server_quit() - that's important for always restoring terminal to a working state.
That means that in usual case this function gets called twice. Make sure that it doesn't try double frees or similar when that happens.
Definition at line 209 of file sernet.c.
Referenced by server_quit(), and server_sniff_all_input().
Server accepts connection from client: Low level socket stuff, and basic-initialize the connection struct. Returns 0 on success, -1 on failure (bad accept(), or too many connections).
Definition at line 1075 of file sernet.c.
Referenced by server_accept_connection().
Open server socket to be used to accept client connections and open a server socket for server LAN announcements.
Definition at line 1137 of file sernet.c.
Referenced by srv_prepare().
enum server_events server_sniff_all_input | ( | void | ) |
Get and handle:
This function also handles prompt printing, via the con_prompt_* functions. That is, other functions should not need to do so. –dwp
Definition at line 527 of file sernet.c.
Referenced by srv_main(), and srv_running().