![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| bool | client_start_server (const QString &user_name) |
| Forks a server if it can. More... | |
| void | client_kill_server (bool force) |
| Kills the server if the client has started it. More... | |
| bool | is_server_running () |
| The general chain of events: More... | |
| bool | can_client_access_hack () |
| Returns TRUE if the client has hack access. More... | |
| void | send_client_wants_hack (const char *filename) |
| If the client is capable of 'wanting hack', then the server will send the client a filename in the packet_join_game_reply packet. More... | |
| void | send_save_game (const char *filename) |
| Send server command to save game. More... | |
| void | set_ruleset (const char *ruleset) |
| Called by the GUI code when the user sets the ruleset. More... | |
| bool can_client_access_hack | ( | ) |
Returns TRUE if the client has hack access.
Definition at line 136 of file connectdlg_common.cpp.
Referenced by mr_menu::nonunit_sensitivity(), and page_pregame::update_buttons().
| void client_kill_server | ( | bool | force | ) |
Kills the server if the client has started it.
If the 'force' parameter is unset, we just do a /quit. If it's set, then we'll send a signal to the server to kill it (use this when the socket is disconnected already).
Definition at line 145 of file connectdlg_common.cpp.
Referenced by client_conn_close_callback(), client_start_server(), disconnect_from_server(), emergency_exit(), and handle_single_want_hack_reply().
| bool client_start_server | ( | const QString & | user_name | ) |
Forks a server if it can.
Returns FALSE if we find we couldn't start the server.
Definition at line 179 of file connectdlg_common.cpp.
Referenced by client_start_server_and_set_page(), client_state(), fc_client::start_from_file(), fc_client::start_new_game(), and fc_client::start_tutorial().
| bool is_server_running | ( | ) |
The general chain of events:
Two distinct paths are taken depending on the choice of mode:
if the user selects the multi- player mode, then a packet_req_join_game packet is sent to the server. It is either successful or not. The end.
If the user selects a single- player mode (either a new game or a save game) then:
Definition at line 125 of file connectdlg_common.cpp.
Referenced by mr_menu::back_to_menu(), client_kill_server(), fc_client::current_page(), handle_server_join_reply(), handle_single_want_hack_reply(), chat_widget::set_chat_visible(), fc_client::start_from_file(), fc_client::start_new_game(), and chat_widget::update_widgets().
| void send_client_wants_hack | ( | const char * | filename | ) |
If the client is capable of 'wanting hack', then the server will send the client a filename in the packet_join_game_reply packet.
This function creates the file with a suitably random string in it and then sends the string to the server. If the server can open and read the string, then the client is given hack access.
Definition at line 319 of file connectdlg_common.cpp.
Referenced by handle_server_join_reply().
| void send_save_game | ( | const char * | filename | ) |
Send server command to save game.
Definition at line 386 of file connectdlg_common.cpp.
Referenced by mr_menu::save_game(), and mr_menu::save_game_as().
| void set_ruleset | ( | const char * | ruleset | ) |
Called by the GUI code when the user sets the ruleset.
The ruleset passed in here should match one of the strings given to set_rulesets().
Definition at line 419 of file connectdlg_common.cpp.
Referenced by pregame_options::ruleset_change().