MySQL 8.0.39
Source Code Documentation
mysql_com_server.h
Go to the documentation of this file.
1/* Copyright (c) 2011, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/**
25 @file include/mysql_com_server.h
26 Definitions private to the server,
27 used in the networking layer to notify specific events.
28*/
29
30#ifndef _mysql_com_server_h
31#define _mysql_com_server_h
32
33#include <stddef.h>
34
35#include "compression.h"
36#include "my_inttypes.h"
37
38typedef void (*before_header_callback_fn)(NET *net, void *user_data,
39 size_t count);
40
41typedef void (*after_header_callback_fn)(NET *net, void *user_data,
42 size_t count, bool rc);
43
44/**
45 This structure holds the negotiated compression algorithm and level
46 between client and server.
47*/
50 unsigned int compress_level;
53 compress_algorithm[0] = '\0';
56 }
57};
58
59typedef struct NET_SERVER {
67
69 ns->m_user_data = nullptr;
70 ns->m_before_header = nullptr;
71 ns->m_after_header = nullptr;
73 ns->timeout_on_full_packet = false;
74}
75
76#endif
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition: compression.h:40
@ MYSQL_UNCOMPRESSED
Definition: my_compress.h:29
Some integer typedefs for easier portability.
static int count
Definition: myisam_ftdump.cc:43
void net_server_ext_init(NET_SERVER *ns)
Definition: mysql_com_server.h:68
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:41
void(* before_header_callback_fn)(NET *net, void *user_data, size_t count)
Definition: mysql_com_server.h:38
Definition: buffer.h:45
Definition: mysql_com_server.h:59
after_header_callback_fn m_after_header
Definition: mysql_com_server.h:61
struct compression_attributes compression
Definition: mysql_com_server.h:63
before_header_callback_fn m_before_header
Definition: mysql_com_server.h:60
void * m_user_data
Definition: mysql_com_server.h:62
bool timeout_on_full_packet
Definition: mysql_com_server.h:65
mysql_compress_context compress_ctx
Definition: mysql_com_server.h:64
Definition: mysql_com.h:913
This structure holds the negotiated compression algorithm and level between client and server.
Definition: mysql_com_server.h:48
bool compression_optional
Definition: mysql_com_server.h:51
unsigned int compress_level
Definition: mysql_com_server.h:50
char compress_algorithm[COMPRESSION_ALGORITHM_NAME_LENGTH_MAX]
Definition: mysql_com_server.h:49
compression_attributes()
Definition: mysql_com_server.h:52
Compression context information.
Definition: my_compress.h:74
enum enum_compression_algorithm algorithm
Compression algorithm name.
Definition: my_compress.h:75