Freeciv-3.2
Loading...
Searching...
No Matches
Data Fields
connection Struct Reference

#include <connection.h>

Data Fields

int id
 
int sock
 
bool used
 
bool established
 
struct packet_header packet_header
 
charclosing_reason
 
bool observer
 
struct playerplaying
 
struct socket_packet_bufferbuffer
 
struct socket_packet_buffersend_buffer
 
struct timerlast_write
 
double ping_time
 
struct conn_listself
 
char username [MAX_LEN_NAME]
 
char addr [MAX_LEN_ADDR]
 
char capability [MAX_LEN_CAPSTR]
 
enum cmdlevel access_level
 
enum gui_type client_gui
 
void(* notify_of_writable_data )(struct connection *pc, bool data_available_and_socket_full)
 
union { 
 
   struct { 
 
      int   last_request_id_used 
 
      int   last_processed_request_id_seen 
 
      int   request_id_of_currently_handled_packet 
 
   }   client 
 
   struct { 
 
      int   currently_processed_request_id 
 
      int   last_request_id_seen 
 
      struct timer_list *   ping_timers 
 
      int   auth_tries 
 
      time_t   auth_settime 
 
      enum auth_status   status 
 
      char   password [MAX_LEN_PASSWORD
 
      char   ipaddr [MAX_LEN_ADDR
 
      enum cmdlevel   granted_access_level 
 
      bool   settings_sent 
 
      struct conn_pattern_list *   ignore_list 
 
      bool   is_closing 
 
      struct { 
 
         bool   status 
 
         struct player *   playing 
 
         bool   observer 
 
      }   delegation 
 
   }   server 
 
};  
 
void(* incoming_packet_notify )(struct connection *pc, int packet_type, int size)
 
void(* outgoing_packet_notify )(struct connection *pc, int packet_type, int size, int request_id)
 
struct { 
 
   struct genhash **   sent 
 
   struct genhash **   received 
 
   const struct packet_handlers *   handlers 
 
phs 
 
struct { 
 
   int   frozen_level 
 
   struct byte_vector   queue 
 
compression 
 
struct { 
 
   int   bytes_send 
 
statistics 
 

Detailed Description

Definition at line 136 of file connection.h.

Field Documentation

◆ [union]

union { ... } connection

◆ access_level

enum cmdlevel connection::access_level

◆ addr

char connection::addr[MAX_LEN_ADDR]

Definition at line 165 of file connection.h.

◆ auth_settime

time_t connection::auth_settime

Definition at line 213 of file connection.h.

◆ auth_tries

int connection::auth_tries

Definition at line 208 of file connection.h.

◆ buffer

struct socket_packet_buffer* connection::buffer

Definition at line 153 of file connection.h.

Referenced by server_sniff_all_input().

◆ bytes_send

int connection::bytes_send

Definition at line 276 of file connection.h.

◆ capability

char connection::capability[MAX_LEN_CAPSTR]

Definition at line 171 of file connection.h.

Referenced by handle_server_join_reply().

◆ [struct]

struct { ... } connection::client

◆ client_gui

enum gui_type connection::client_gui

Definition at line 179 of file connection.h.

Referenced by api_methods_player_controlling_gui().

◆ closing_reason

char* connection::closing_reason

Definition at line 142 of file connection.h.

◆ [struct]

struct { ... } connection::compression

◆ currently_processed_request_id

int connection::currently_processed_request_id

Definition at line 198 of file connection.h.

◆ [struct]

struct { ... } connection::delegation

Referenced by delegate_command().

◆ established

bool connection::established

◆ frozen_level

int connection::frozen_level

Definition at line 270 of file connection.h.

◆ granted_access_level

enum cmdlevel connection::granted_access_level

Definition at line 224 of file connection.h.

◆ handlers

const struct packet_handlers* connection::handlers

Definition at line 265 of file connection.h.

◆ id

int connection::id

◆ ignore_list

struct conn_pattern_list* connection::ignore_list

Definition at line 230 of file connection.h.

Referenced by ignore_command(), show_ignore(), and unignore_command().

◆ incoming_packet_notify

void(* connection::incoming_packet_notify) (struct connection *pc, int packet_type, int size)

Definition at line 251 of file connection.h.

Referenced by make_connection().

◆ ipaddr

char connection::ipaddr[MAX_LEN_ADDR]

Definition at line 221 of file connection.h.

Referenced by kick_command().

◆ is_closing

bool connection::is_closing

Definition at line 234 of file connection.h.

◆ last_processed_request_id_seen

int connection::last_processed_request_id_seen

◆ last_request_id_seen

int connection::last_request_id_seen

Definition at line 201 of file connection.h.

◆ last_request_id_used

int connection::last_request_id_used

◆ last_write

struct timer* connection::last_write

Definition at line 155 of file connection.h.

◆ notify_of_writable_data

void(* connection::notify_of_writable_data) (struct connection *pc, bool data_available_and_socket_full)

Definition at line 181 of file connection.h.

Referenced by add_net_input().

◆ observer

bool connection::observer

◆ outgoing_packet_notify

void(* connection::outgoing_packet_notify) (struct connection *pc, int packet_type, int size, int request_id)

Definition at line 259 of file connection.h.

Referenced by make_connection().

◆ packet_header

struct packet_header connection::packet_header

Definition at line 141 of file connection.h.

◆ password

char connection::password[MAX_LEN_PASSWORD]

Definition at line 218 of file connection.h.

◆ [struct]

struct { ... } connection::phs

◆ ping_time

double connection::ping_time

Definition at line 161 of file connection.h.

Referenced by handle_conn_ping_info().

◆ ping_timers

struct timer_list* connection::ping_timers

Definition at line 205 of file connection.h.

◆ playing

struct player* connection::playing

Definition at line 151 of file connection.h.

Referenced by activate_all_units(), trade_generator::add_all_cities(), adv_unit_sentry_idle_callback(), append_cma_to_menu_item(), apply_taxrates_callback(), away_command(), blink_turn_done_button(), button_up_on_map(), can_client_change_view(), can_client_control(), can_end_turn(), can_intel_with_player(), can_meet_with_player(), center_on_something(), check_city(), city_can_buy(), city_dialog_update_present_units(), city_dialog_update_prev_next(), city_dialog_update_supported_units(), city_dlg_callback(), city_packet_common(), client_change_all(), client_game_free(), client_game_init(), client_government_sprite(), client_has_player(), client_is_global_observer(), client_player_maps_reset(), client_player_number(), client_research_sprite(), client_tile_get_known(), clipboard_copy_production(), clipboard_paste_production(), cma_put_city_under_agent(), cmp_love(), col_diplstate(), col_embassy(), col_love(), col_vision(), collect_buildable_targets(), collect_currently_building_targets(), common_taxrates_callback(), control_mouse_cursor(), create_conn_menu(), create_governor_menu(), units_select::create_pixmap(), create_present_supported_units_widget_list(), create_races_dialog(), create_rates_dialog(), create_tech_info(), define_tiles_within_rectangle(), delegate_command(), diplomacy_dialog_city_callback(), diplstate_value(), disband_all_units(), do_map_click(), do_move_unit(), do_unit_patrol_to(), economy_report_dialog_popup(), enable_city_dlg_widgets(), fc_double_edge::fc_double_edge(), fill_grid_sprite_array(), find_best_focus_candidate(), find_city_or_settler_near_tile(), find_diplomacy_dialog(), find_visible_unit(), city_widget::gen_production_labels(), get_act_sel_action_custom_text(), get_bulb_tooltip(), get_city_mapview_name_and_growth(), get_economy_report_data(), get_economy_report_units_data(), get_government_tooltip(), get_info_label_text(), get_info_label_text_popup(), get_tile_output_text(), get_tooltip(), get_tooltip_improvement(), get_tooltip_unit(), get_turn_done_button_state(), get_units_report_data(), get_units_upgrade_info(), handle_city_info(), handle_conn_info(), handle_event(), handle_new_year(), handle_player_info(), handle_player_remove(), handle_start_phase(), handle_tile_info(), handle_unit_action_answer(), handle_unit_combat_info(), handle_unit_packet_common(), handle_unit_short_info(), handle_worker_task(), has_player_unit_type(), have_diplomat_info_about(), help_update_extra(), help_update_goods(), help_update_government(), help_update_improvement(), help_update_specialist(), help_update_tech(), help_update_terrain(), help_update_unit_type(), help_update_wonder(), horiz_taxrate_callback(), infra_placement_set_tile(), key_unit_assign_battlegroup(), key_unit_select_battlegroup(), main_key_down_handler(), main_key_down_handler(), mapimg_client_define(), menu_item_callback(), menu_item_callback(), meswin_dialog_update(), meswin_popup_city(), research_diagram::mouseMoveEvent(), multiairlift(), races_dialog::nation_selected(), nationset_changed(), city_dialog::next_city(), next_prev_city_dlg_callback(), notify_goto::notify_goto(), num_present_units_in_city(), num_supported_units_in_city(), ok_sell_impr_callback(), overview_tile_color(), popup_advanced_terrain_dialog(), popup_airlift_dialog(), popup_diplomacy_dialog(), popup_goto_airlift_dialog(), popup_goto_dialog(), popup_government_dialog(), popup_impr_info(), popup_info_text(), popup_notify_goto_dialog(), popup_players_nations_dialog(), popup_rates_dialog(), popup_revolution_dialog(), popup_revolution_dialog(), popup_sabotage_dialog(), popup_sell_impr_callback(), popup_unit_info(), popup_upgrade_unit_callback(), popup_worklist_editor(), present_unit_callback(), city_dialog::prev_city(), quickselect(), races_dialog::races_dialog(), races_update_pickable(), rates_set_values(), real_activeunits_report_dialog_update(), real_city_dialog_popup(), real_city_dialog_refresh(), real_city_report_dialog_update(), real_economy_report_dialog_update(), real_info_city_report_dialog_update(), real_menus_update(), real_units_report_dialog_update(), rebuild_imprm_list(), redraw_army_city_dialog(), redraw_supported_units_city_dialog(), redraw_unit_info_label(), refresh_spaceship_dialog(), refresh_worklist(), report_spaceship_callback(), report_spaceship_callback(), request_unit_unload(), science_dialog_text(), score_tooltip(), select_nation_callback(), select_unit_image_callback(), sell_all_improvements(), sell_callback(), send_diplomatic_meetings(), set_government_choice(), set_indicator_icons(), help_widget::set_topic_building(), help_widget::set_topic_extra(), help_widget::set_topic_goods(), help_widget::set_topic_government(), help_widget::set_topic_specialist(), help_widget::set_topic_tech(), help_widget::set_topic_terrain(), help_widget::set_topic_unit(), show_full_citybar(), show_new_turn_info(), side_right_click_diplomacy(), mr_menu::slot_spaceship(), spy_steal_popup_shared(), src_selection_callback(), start_command(), start_style_music(), switch_city_callback(), target_drag_data_received(), target_drag_data_received(), tax_rates_dialog::tax_rates_dialog(), toggle_tile_hilite(), unit_focus_add(), unit_focus_advance(), unit_focus_remove(), unit_focus_set(), unit_focus_update(), unit_select_dialog_popup(), units_orders_city_dlg_callback(), gov_menu::update(), mr_menu::update_airlift_menu(), city_dialog::update_buy_button(), city_dialog::update_disabled(), fc_sidewidget::update_final_pixmap(), fc_client::update_info_label(), update_info_label(), update_infra_dialog(), update_players_menu(), city_dialog::update_prod_buttons(), ss_report::update_report(), plr_report::update_report(), fc_client::update_sidebar_tooltips(), city_dialog::update_units(), upgrade_canvas_clipboard(), and wakeup_sentried_units().

◆ queue

struct byte_vector connection::queue

Definition at line 272 of file connection.h.

◆ received

struct genhash** connection::received

Definition at line 264 of file connection.h.

◆ request_id_of_currently_handled_packet

int connection::request_id_of_currently_handled_packet

◆ self

struct conn_list* connection::self

Definition at line 163 of file connection.h.

Referenced by cmd_reply_line(), and player_reply_dest().

◆ send_buffer

struct socket_packet_buffer* connection::send_buffer

Definition at line 154 of file connection.h.

◆ sent

struct genhash** connection::sent

Definition at line 263 of file connection.h.

◆ [struct]

struct { ... } connection::server

◆ settings_sent

bool connection::settings_sent

Definition at line 227 of file connection.h.

◆ sock

int connection::sock

◆ [struct]

struct { ... } connection::statistics

◆ status [1/2]

enum auth_status connection::status

◆ status [2/2]

bool connection::status

Definition at line 239 of file connection.h.

◆ used

bool connection::used

◆ username

char connection::username[MAX_LEN_NAME]