Freeciv21
Develop your civilization from humble roots to a global empire
clinet.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  __ __ part of Freeciv21. Freeciv21 is free software: you can
4 / \\..// \ redistribute it and/or modify it under the terms of the GNU
5  ( oo ) General Public License as published by the Free Software
6  \__/ Foundation, either version 3 of the License, or (at your
7  option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10 **************************************************************************/
11 #pragma once
12 
13 // Forward declarations
14 class QIODevice;
15 class QString;
16 class QUrl;
17 
18 int connect_to_server(const QUrl &url, char *errbuf, int errbufsize);
19 
20 void make_connection(QIODevice *sock, const QString &username);
21 
22 void input_from_server(QIODevice *sock);
24 
25 double try_to_autoconnect(const QUrl &url);
26 void start_autoconnecting_to_server(const QUrl &url);
void make_connection(QIODevice *sock, const QString &username)
Called after a connection is completed (e.g., in try_to_connect).
Definition: clinet.cpp:188
void input_from_server(QIODevice *sock)
This function is called when the client received a new input from the server.
Definition: clinet.cpp:297
double try_to_autoconnect(const QUrl &url)
Make an attempt to autoconnect to the server.
Definition: clinet.cpp:339
void start_autoconnecting_to_server(const QUrl &url)
Start trying to autoconnect to freeciv21-server.
Definition: clinet.cpp:377
int connect_to_server(const QUrl &url, char *errbuf, int errbufsize)
Connect to a freeciv21-server instance – or at least try to.
Definition: clinet.cpp:167
void disconnect_from_server()
Get rid of server connection.
Definition: clinet.cpp:219