1 | /* Copyright (C) 2012 MariaDB Services and Kristian Nielsen |
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 as published by |
5 | the Free Software Foundation; version 2 of the License. |
6 | |
7 | This program is distributed in the hope that it will be useful, |
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 | GNU General Public License for more details. |
11 | |
12 | You should have received a copy of the GNU General Public License |
13 | along with this program; if not, write to the Free Software |
14 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
15 | MA 02111-1301, USA */ |
16 | |
17 | /* Common definitions for MariaDB non-blocking client library. */ |
18 | |
19 | #ifndef MYSQL_ASYNC_H |
20 | #define MYSQL_ASYNC_H |
21 | |
22 | extern int my_connect_async(MARIADB_PVIO *pvio, |
23 | const struct sockaddr *name, uint namelen, |
24 | int vio_timeout); |
25 | extern ssize_t my_recv_async(MARIADB_PVIO *pvio, |
26 | unsigned char *buf, size_t size, int timeout); |
27 | extern ssize_t my_send_async(MARIADB_PVIO *pvio, |
28 | const unsigned char *buf, size_t size, |
29 | int timeout); |
30 | extern my_bool my_io_wait_async(struct mysql_async_context *b, |
31 | enum enum_pvio_io_event event, int timeout); |
32 | #ifdef HAVE_TLS |
33 | extern ssize_t ma_tls_read_async(MARIADB_PVIO *pvio, const uchar *buf, size_t size); |
34 | extern ssize_t ma_tls_write_async(MARIADB_PVIO *pvio, const uchar *buf, size_t size); |
35 | #endif |
36 | |
37 | #endif /* MYSQL_ASYNC_H */ |
38 | |