CUBRID Engine  latest
connection_cl.h File Reference
Include dependency graph for connection_cl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DB_CONNECT_ORDER_SEQ   0
 
#define DB_CONNECT_ORDER_RANDOM   1
 
#define DB_HS_NORMAL   0x00000000
 
#define DB_HS_CONN_TIMEOUT   0x00000001
 
#define DB_HS_CONN_FAILURE   0x00000002
 
#define DB_HS_MISMATCHED_RW_MODE   0x00000004
 
#define DB_HS_HA_DELAYED   0x00000008
 
#define DB_HS_NON_PREFFERED_HOSTS   0x00000010
 
#define DB_HS_UNUSABLE_DATABASES   0x00000020
 
#define DB_HS_RECONNECT_INDICATOR   (DB_HS_MISMATCHED_RW_MODE | DB_HS_HA_DELAYED | DB_HS_NON_PREFFERED_HOSTS)
 

Functions

void css_shutdown_conn (CSS_CONN_ENTRY *conn)
 
CSS_CONN_ENTRYcss_make_conn (SOCKET fd)
 
void css_free_conn (CSS_CONN_ENTRY *conn)
 
CSS_CONN_ENTRYcss_connect_to_master_server (int master_port_id, const char *server_name, int name_length)
 
CSS_CONN_ENTRYcss_find_exception_conn (void)
 
int css_receive_error (CSS_CONN_ENTRY *conn, unsigned short req_id, char **buffer, int *buffer_size)
 
CSS_CONN_ENTRYcss_connect_to_cubrid_server (char *host_name, char *server_name)
 
CSS_CONN_ENTRYcss_connect_to_master_for_info (const char *host_name, int port_id, unsigned short *rid)
 
CSS_CONN_ENTRYcss_connect_to_master_timeout (const char *host_name, int port_id, int timeout, unsigned short *rid)
 
bool css_does_master_exist (int port_id)
 
int css_receive_data (CSS_CONN_ENTRY *conn, unsigned short rid, char **buffer, int *size, int timeout)
 
int css_receive_request (CSS_CONN_ENTRY *conn, unsigned short *rid, int *request, int *arg_buffer_size)
 
int css_send_close_request (CSS_CONN_ENTRY *conn)
 
int css_test_for_open_conn (CSS_CONN_ENTRY *conn)
 
CSS_CONN_ENTRYcss_find_conn_from_fd (SOCKET fd)
 
unsigned short css_get_request_id (CSS_CONN_ENTRY *conn)
 
char * css_return_data_buffer (CSS_CONN_ENTRY *conn, unsigned short request_id, int *buffer_size)
 
bool css_is_valid_request_id (CSS_CONN_ENTRY *conn, unsigned short request_id)
 
int css_return_queued_error (CSS_CONN_ENTRY *conn, unsigned short request_id, char **buffer, int *buffer_size, int *rc)
 
void css_remove_all_unexpected_packets (CSS_CONN_ENTRY *conn)
 
int css_read_one_request (CSS_CONN_ENTRY *conn, unsigned short *rid, int *request, int *buffer_size)
 

Macro Definition Documentation

#define DB_CONNECT_ORDER_RANDOM   1

Definition at line 34 of file connection_cl.h.

Referenced by boot_client_all_finalize().

#define DB_CONNECT_ORDER_SEQ   0
#define DB_HS_CONN_FAILURE   0x00000002

Definition at line 39 of file connection_cl.h.

Referenced by boot_client_all_finalize(), and report_abnormal_host_status().

#define DB_HS_CONN_TIMEOUT   0x00000001

Definition at line 38 of file connection_cl.h.

Referenced by boot_client_all_finalize(), and report_abnormal_host_status().

#define DB_HS_HA_DELAYED   0x00000008
#define DB_HS_MISMATCHED_RW_MODE   0x00000004

Definition at line 40 of file connection_cl.h.

Referenced by check_server_capabilities(), and report_abnormal_host_status().

#define DB_HS_NON_PREFFERED_HOSTS   0x00000010

Definition at line 42 of file connection_cl.h.

Referenced by boot_restart_client(), and report_abnormal_host_status().

#define DB_HS_NORMAL   0x00000000

Definition at line 37 of file connection_cl.h.

Referenced by db_clear_host_status(), and db_set_connected_host_status().

#define DB_HS_RECONNECT_INDICATOR   (DB_HS_MISMATCHED_RW_MODE | DB_HS_HA_DELAYED | DB_HS_NON_PREFFERED_HOSTS)

Definition at line 45 of file connection_cl.h.

Referenced by db_need_reconnect().

#define DB_HS_UNUSABLE_DATABASES   0x00000020

Definition at line 43 of file connection_cl.h.

Referenced by boot_client_all_finalize(), and report_abnormal_host_status().

Function Documentation

CSS_CONN_ENTRY* css_connect_to_master_for_info ( const char *  host_name,
int  port_id,
unsigned short *  rid 
)

Definition at line 1158 of file connection_cl.c.

References css_connect_to_master_timeout().

Referenced by main().

Here is the caller graph for this function:

CSS_CONN_ENTRY* css_connect_to_master_server ( int  master_port_id,
const char *  server_name,
int  name_length 
)

Definition at line 861 of file connection_cl.c.

CSS_CONN_ENTRY* css_connect_to_master_timeout ( const char *  host_name,
int  port_id,
int  timeout,
unsigned short *  rid 
)

Definition at line 1175 of file connection_cl.c.

References css_common_connect(), css_make_conn(), INFO_REQUEST, and NULL.

Referenced by connect_to_master_for_server_monitor(), and css_connect_to_master_for_info().

Here is the caller graph for this function:

CSS_CONN_ENTRY* css_find_conn_from_fd ( SOCKET  fd)

Definition at line 256 of file connection_cl.c.

CSS_CONN_ENTRY* css_find_exception_conn ( void  )

Definition at line 245 of file connection_cl.c.

References NULL.

Referenced by css_handle_pipe_shutdown().

Here is the caller graph for this function:

void css_free_conn ( CSS_CONN_ENTRY conn)

Definition at line 234 of file connection_cl.c.

unsigned short css_get_request_id ( CSS_CONN_ENTRY conn)

Definition at line 277 of file connection_cl.c.

bool css_is_valid_request_id ( CSS_CONN_ENTRY conn,
unsigned short  request_id 
)

Definition at line 1222 of file connection_cl.c.

References css_conn_entry::abort_queue, css_find_queue_entry(), css_conn_entry::data_queue, css_conn_entry::error_queue, NULL, and css_conn_entry::request_queue.

Referenced by css_get_request_id().

Here is the caller graph for this function:

CSS_CONN_ENTRY* css_make_conn ( SOCKET  fd)

Definition at line 167 of file connection_cl.c.

int css_read_one_request ( CSS_CONN_ENTRY conn,
unsigned short *  rid,
int *  request,
int *  buffer_size 
)
int css_receive_data ( CSS_CONN_ENTRY conn,
unsigned short  rid,
char **  buffer,
int *  size,
int  timeout 
)

Definition at line 482 of file connection_cl.c.

int css_receive_request ( CSS_CONN_ENTRY conn,
unsigned short *  rid,
int *  request,
int *  arg_buffer_size 
)

Definition at line 455 of file connection_cl.c.

void css_remove_all_unexpected_packets ( CSS_CONN_ENTRY conn)

Definition at line 1467 of file connection_cl.c.

char* css_return_data_buffer ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
int *  buffer_size 
)
int css_return_queued_error ( CSS_CONN_ENTRY conn,
unsigned short  request_id,
char **  buffer,
int *  buffer_size,
int *  rc 
)

Definition at line 1364 of file connection_cl.c.

void css_shutdown_conn ( CSS_CONN_ENTRY conn)

Definition at line 127 of file connection_cl.c.

int css_test_for_open_conn ( CSS_CONN_ENTRY conn)

Definition at line 313 of file connection_cl.c.

References CONN_OPEN, and css_conn_entry::status.

Referenced by css_return_open_entry().

Here is the caller graph for this function: