MySQL 8.1.0
Source Code Documentation
mysql_com_server.h
Go to the documentation of this file.
1/* Copyright (c) 2011, 2023, Oracle and/or its affiliates.
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/**
24 @file include/mysql_com_server.h
25 Definitions private to the server,
26 used in the networking layer to notify specific events.
27*/
28
29#ifndef _mysql_com_server_h
30#define _mysql_com_server_h
31
32#include <stddef.h>
33
34#include "compression.h"
35#include "my_inttypes.h"
36
37typedef void (*before_header_callback_fn)(NET *net, void *user_data,
38 size_t count);
39
40typedef void (*after_header_callback_fn)(NET *net, void *user_data,
41 size_t count, bool rc);
42
43/**
44 This structure holds the negotiated compression algorithm and level
45 between client and server.
46*/
49 unsigned int compress_level;
52 compress_algorithm[0] = '\0';
55 }
56};
57
58typedef struct NET_SERVER {
66
68 ns->m_user_data = nullptr;
69 ns->m_before_header = nullptr;
70 ns->m_after_header = nullptr;
72 ns->timeout_on_full_packet = false;
73}
74
75#endif
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition: compression.h:39
@ MYSQL_UNCOMPRESSED
Definition: my_compress.h:28
Some integer typedefs for easier portability.
static int count
Definition: myisam_ftdump.cc:44
void net_server_ext_init(NET_SERVER *ns)
Definition: mysql_com_server.h:67
struct NET_SERVER NET_SERVER
void(* after_header_callback_fn)(NET *net, void *user_data, size_t count, bool rc)
Definition: mysql_com_server.h:40
void(* before_header_callback_fn)(NET *net, void *user_data, size_t count)
Definition: mysql_com_server.h:37
Definition: buffer.h:44
Definition: mysql_com_server.h:58
after_header_callback_fn m_after_header
Definition: mysql_com_server.h:60
struct compression_attributes compression
Definition: mysql_com_server.h:62
before_header_callback_fn m_before_header
Definition: mysql_com_server.h:59
void * m_user_data
Definition: mysql_com_server.h:61
bool timeout_on_full_packet
Definition: mysql_com_server.h:64
mysql_compress_context compress_ctx
Definition: mysql_com_server.h:63
Definition: mysql_com.h:912
This structure holds the negotiated compression algorithm and level between client and server.
Definition: mysql_com_server.h:47
bool compression_optional
Definition: mysql_com_server.h:50
unsigned int compress_level
Definition: mysql_com_server.h:49
char compress_algorithm[COMPRESSION_ALGORITHM_NAME_LENGTH_MAX]
Definition: mysql_com_server.h:48
compression_attributes()
Definition: mysql_com_server.h:51
Compression context information.
Definition: my_compress.h:73
enum enum_compression_algorithm algorithm
Compression algorithm name.
Definition: my_compress.h:74