MySQL  8.0.18
Source Code Documentation
vio_priv.h
Go to the documentation of this file.
1 /* Copyright (c) 2003, 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 #ifndef VIO_PRIV_INCLUDED
24 #define VIO_PRIV_INCLUDED
25 
26 /**
27  @file vio/vio_priv.h
28  Structures and functions private to the vio package
29 */
30 
31 #define DONT_MAP_VIO
32 #include <mysql_com.h>
33 
34 #include "m_string.h"
35 #include "my_sys.h"
36 #include "mysql/psi/psi_memory.h"
37 #include "violite.h"
38 
41 
42 #ifdef HAVE_OPENSSL
43 extern PSI_memory_key key_memory_vio_ssl_fd;
44 #endif
45 
46 #ifdef _WIN32
47 size_t vio_read_pipe(Vio *vio, uchar *buf, size_t size);
48 size_t vio_write_pipe(Vio *vio, const uchar *buf, size_t size);
49 bool vio_is_connected_pipe(Vio *vio);
50 int vio_shutdown_pipe(Vio *vio);
51 
52 size_t vio_read_shared_memory(Vio *vio, uchar *buf, size_t size);
53 size_t vio_write_shared_memory(Vio *vio, const uchar *buf, size_t size);
56 void vio_delete_shared_memory(Vio *vio);
57 #endif /* _WIN32 */
58 
59 bool vio_buff_has_data(Vio *vio);
60 int vio_socket_io_wait(Vio *vio, enum enum_vio_io_event event);
61 int vio_socket_timeout(Vio *vio, uint which, bool old_mode);
62 
63 #ifdef HAVE_OPENSSL
64 size_t vio_ssl_read(Vio *vio, uchar *buf, size_t size);
65 size_t vio_ssl_write(Vio *vio, const uchar *buf, size_t size);
66 
67 /* When the workday is over... */
68 int vio_ssl_shutdown(Vio *vio);
69 void vio_ssl_delete(Vio *vio);
70 bool vio_ssl_has_data(Vio *vio);
71 
72 #endif /* HAVE_OPENSSL */
73 
74 #endif /* VIO_PRIV_INCLUDED */
size_t vio_write_shared_memory(Vio *vio, const uchar *buf, size_t size)
Definition: vioshm.cc:98
unsigned char uchar
Definition: my_inttypes.h:51
int vio_socket_io_wait(Vio *vio, enum enum_vio_io_event event)
Attempt to wait for an I/O event on a socket.
Definition: viosocket.cc:91
bool old_mode
compatibility option:
Definition: mysqld.cc:1041
void vio_delete_shared_memory(Vio *vio)
Definition: vioshm.cc:148
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:46
Common definition between mysql server & client.
bool vio_is_connected_pipe(Vio *vio)
Definition: viopipe.cc:91
int vio_socket_timeout(Vio *vio, uint which, bool old_mode)
Definition: viosocket.cc:302
unsigned int uint
Definition: uca-dump.cc:29
Definition: violite.h:324
int vio_shutdown_shared_memory(Vio *vio)
Definition: vioshm.cc:194
Common header for many mysys elements.
bool vio_buff_has_data(Vio *vio)
Definition: viosocket.cc:208
size_t vio_read_shared_memory(Vio *vio, uchar *buf, size_t size)
Definition: vioshm.cc:28
enum_vio_io_event
VIO I/O events.
Definition: violite.h:128
Performance schema instrumentation interface.
bool vio_is_connected_shared_memory(Vio *vio)
Definition: vioshm.cc:144
Vio Lite.
size_t vio_read_pipe(Vio *vio, uchar *buf, size_t count)
Definition: viopipe.cc:56
int vio_shutdown_pipe(Vio *vio)
Definition: viopipe.cc:98
PSI_memory_key key_memory_vio_read_buffer
Definition: vio.cc:54
PSI_memory_key key_memory_vio
Definition: vio.cc:53
size_t vio_write_pipe(Vio *vio, const uchar *buf, size_t count)
Definition: viopipe.cc:73