27 #define SERVER_LAN_PORT 4555
28 #define SERVER_LAN_TTL 1
29 #define SERVER_LAN_VERSION 2
32 std::variant<std::unique_ptr<QTcpServer>, std::unique_ptr<QLocalServer>>;
41 const QString &ip_addr);
void connection_ping(struct connection *pconn)
Ping a connection.
void init_connections()
Initialize connection related stuff.
void handle_conn_pong(struct connection *pconn)
Handle response to ping.
void incoming_client_packets(connection *pconn)
Handle all incoming packets on a client connection.
void get_lanserver_announcement()
Listen for UDP packets multicasted from clients requesting announcement of servers on the LAN.
void close_connections_and_socket()
Close all network stuff: connections, listening sockets, metaserver connection...
void really_close_connections()
Now really close connections marked as 'is_closing'.
void handle_client_heartbeat(struct connection *pconn)
Handle client's regular hearbeat.
int server_make_connection(QIODevice *new_sock, const QString &client_addr, const QString &ip_addr)
Server accepts connection from client: Low level socket stuff, and basic-initialize the connection st...
void flush_packets()
Attempt to flush all information in the send buffers for upto 'netwait' seconds.
std::optional< socket_server > server_open_socket()
Open server socket to be used to accept client connections and open a server socket for server LAN an...
std::variant< std::unique_ptr< QTcpServer >, std::unique_ptr< QLocalServer > > socket_server
void finish_unit_waits()
Process all unit waits that are expired.