MySQL
8.0.23
Source Code Documentation
mysql_com_server.h
Go to the documentation of this file.
1
/* Copyright (c) 2011, 2019, 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
/**
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
37
typedef
void (*
before_header_callback_fn
)(
NET
*
net
,
void
*user_data,
38
size_t
count
);
39
40
typedef
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
*/
47
struct
compression_attributes
{
48
char
compress_algorithm
[
COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
];
49
unsigned
int
compress_level
;
50
bool
compression_optional
;
51
compression_attributes
() {
52
compress_algorithm
[0] =
'\0'
;
53
compress_level
= 0;
54
compression_optional
=
false
;
55
}
56
};
57
58
typedef
struct
NET_SERVER
{
59
before_header_callback_fn
m_before_header
;
60
after_header_callback_fn
m_after_header
;
61
void
*
m_user_data
;
62
struct
compression_attributes
compression
;
63
mysql_compress_context
compress_ctx
;
64
}
NET_SERVER
;
65
66
#endif
compression.h
compression_attributes::compression_optional
bool compression_optional
Definition:
mysql_com_server.h:50
COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition:
compression.h:39
NET_SERVER
struct NET_SERVER NET_SERVER
compression_attributes
This structure holds the negotiated compression algorithm and level between client and server.
Definition:
mysql_com_server.h:47
NET_SERVER
Definition:
mysql_com_server.h:58
mysql_compress_context
Compression context information.
Definition:
my_compress.h:73
NET_SERVER::m_before_header
before_header_callback_fn m_before_header
Definition:
mysql_com_server.h:59
net
Definition:
buffer.h:39
my_inttypes.h
before_header_callback_fn
void(* before_header_callback_fn)(NET *net, void *user_data, size_t count)
Definition:
mysql_com_server.h:37
after_header_callback_fn
void(* after_header_callback_fn)(NET *net, void *user_data, size_t count, bool rc)
Definition:
mysql_com_server.h:40
compression_attributes::compress_level
unsigned int compress_level
Definition:
mysql_com_server.h:49
NET_SERVER::m_user_data
void * m_user_data
Definition:
mysql_com_server.h:61
NET
Definition:
mysql_com.h:879
NET_SERVER::compress_ctx
mysql_compress_context compress_ctx
Definition:
mysql_com_server.h:63
compression_attributes::compress_algorithm
char compress_algorithm[COMPRESSION_ALGORITHM_NAME_LENGTH_MAX]
Definition:
mysql_com_server.h:48
NET_SERVER::m_after_header
after_header_callback_fn m_after_header
Definition:
mysql_com_server.h:60
count
ssize_t count
Definition:
memcached.c:386
compression_attributes::compression_attributes
compression_attributes()
Definition:
mysql_com_server.h:51
NET_SERVER::compression
struct compression_attributes compression
Definition:
mysql_com_server.h:62
include
mysql_com_server.h
Generated by
1.8.18