MySQL  8.0.22
Source Code Documentation
server_struct.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef SERVER_STRUCT_H
24 #define SERVER_STRUCT_H
25 
26 #include "xcom/task.h"
27 #include "xcom/xcom_common.h"
28 #include "xcom/xcom_limits.h"
29 
30 struct srv_buf {
33  char buf[0x10000];
34 };
35 typedef struct srv_buf srv_buf;
36 
37 /* Server definition */
38 struct server {
39  int garbage;
40  int refcnt;
41  char *srv; /* Server name */
42  xcom_port port; /* Port */
43  connection_descriptor con; /* Descriptor for open connection */
44  double active; /* Last activity */
45  double detected; /* Last incoming */
46  channel outgoing; /* Outbound messages */
47  task_env *sender; /* The sender task */
48  task_env *reply_handler; /* The reply task */
50  int invalid;
51  int number_of_pings_received; /* Number of pings received from this server */
52  double last_ping_received; /* Last received ping timestamp */
53 };
54 
55 typedef struct server server;
56 
57 #endif
connection_descriptor con
Definition: server_struct.h:43
char * srv
Definition: server_struct.h:41
int number_of_pings_received
Definition: server_struct.h:51
int refcnt
Definition: server_struct.h:40
task_env * reply_handler
Definition: server_struct.h:48
Definition: task.h:437
Definition: buf0block_hint.cc:29
xcom_port port
Definition: server_struct.h:42
unsigned short xcom_port
Definition: xcom_common.h:45
srv_buf out_buf
Definition: server_struct.h:49
channel outgoing
Definition: server_struct.h:46
int garbage
Definition: server_struct.h:39
Definition: node_connection.h:44
double detected
Definition: server_struct.h:45
Definition: server_struct.h:38
double active
Definition: server_struct.h:44
u_int n
Definition: server_struct.h:32
__u_int u_int
Definition: types.h:72
task_env * sender
Definition: server_struct.h:47
int invalid
Definition: server_struct.h:50
Rudimentary task system in portable C, based on Tom Duff's switch-based coroutine trick and a stack...
Definition: server_struct.h:30
double last_ping_received
Definition: server_struct.h:52
u_int start
Definition: server_struct.h:31
Definition: task.h:241