Freeciv-3.3
Loading...
Searching...
No Matches
sernet.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__SERNET_H
14#define FC__SERNET_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20struct connection;
21
22#define BUF_SIZE 512
23
24#define SERVER_LAN_PORT 4555
25#define SERVER_LAN_TTL 1
26#define SERVER_LAN_VERSION 2
27
33
35
36int server_open_socket(void);
37void flush_packets(void);
39void init_connections(void);
41 const char *client_addr, const char *client_ip);
44
45void readline_atexit(void);
46
47#ifdef __cplusplus
48}
49#endif /* __cplusplus */
50
51#endif /* FC__SERNET_H */
char * incite_cost
Definition comments.c:76
server_events
Definition sernet.h:28
@ S_E_OTHERWISE
Definition sernet.h:30
@ S_E_END_OF_TURN_TIMEOUT
Definition sernet.h:29
@ S_E_FORCE_END_OF_SNIFF
Definition sernet.h:31
int server_open_socket(void)
Definition sernet.c:1133
void flush_packets(void)
Definition sernet.c:376
void init_connections(void)
Definition sernet.c:1362
int server_make_connection(int new_sock, const char *client_addr, const char *client_ip)
Definition sernet.c:1071
void handle_conn_pong(struct connection *pconn)
Definition sernet.c:1441
enum server_events server_sniff_all_input(void)
Definition sernet.c:522
void handle_client_heartbeat(struct connection *pconn)
Definition sernet.c:1461
void readline_atexit(void)
Definition sernet.c:204
void close_connections_and_socket(void)
Definition sernet.c:255