CUBRID Engine  latest
connection_globals.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * connection_globals.h -
22  */
23 
24 #ifndef _CONNECTION_GLOBALS_H_
25 #define _CONNECTION_GLOBALS_H_
26 
27 #ident "$Id$"
28 
29 #include "connection_defs.h"
30 
31 #define CSS_CR_NORMAL_ONLY_IDX 0
32 
33 #define CSS_MAX_CLIENT_COUNT 4000
34 
35 typedef bool (*CSS_CHECK_CLIENT_TYPE) (BOOT_CLIENT_TYPE client_type);
36 typedef int (*CSS_GET_MAX_CONN_NUM) (void);
37 
38 /*
39  * a rule defining how a client consumes connections.
40  * ex) a client using CR_NORMAL_FIRST_RESERVED_LAST
41  * consumes a normal connection first and uses
42  * a reserved one last
43  */
44 typedef enum css_conn_rule
45 {
50 
51 typedef struct css_conn_rule_info
52 {
59 
60 extern int css_Service_id;
61 extern const char *css_Service_name;
62 
67 extern const int css_Conn_rules_size;
68 
70 
71 #define CSS_NET_MAGIC_SIZE 8
73 extern void css_init_conn_rules (void);
74 extern int css_get_max_conn (void);
75 
76 #endif /* _CONNECTION_GLOBALS_H_ */
bool(* CSS_CHECK_CLIENT_TYPE)(BOOT_CLIENT_TYPE client_type)
css_conn_rule
CSS_GET_MAX_CONN_NUM get_max_conn_num_fn
int SOCKET
Definition: porting.h:482
int css_Server_use_new_connection_protocol
enum db_client_type BOOT_CLIENT_TYPE
const int css_Conn_rules_size
SOCKET css_Pipe_to_master
struct css_conn_rule_info CSS_CONN_RULE_INFO
#define bool
Definition: dbi_compat.h:31
CSS_CONN_RULE_INFO css_Conn_rules[]
const char * css_Service_name
CSS_CHECK_CLIENT_TYPE check_client_type_fn
SOCKET css_Server_connection_socket
int(* CSS_GET_MAX_CONN_NUM)(void)
void css_init_conn_rules(void)
enum css_conn_rule CSS_CONN_RULE
int css_Server_inhibit_connection_socket
#define CSS_NET_MAGIC_SIZE
int css_get_max_conn(void)
int css_Service_id
char css_Net_magic[CSS_NET_MAGIC_SIZE]