9
3

mysql_async.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Copyright (C) 2012 MariaDB Services and Kristian Nielsen
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. /* Common definitions for MariaDB non-blocking client library. */
  13. #ifndef MYSQL_ASYNC_H
  14. #define MYSQL_ASYNC_H
  15. extern int my_connect_async(struct mysql_async_context *b, my_socket fd,
  16. const struct sockaddr *name, uint namelen,
  17. int vio_timeout);
  18. extern ssize_t my_recv_async(struct mysql_async_context *b, int fd,
  19. unsigned char *buf, size_t size, int timeout);
  20. extern ssize_t my_send_async(struct mysql_async_context *b, int fd,
  21. const unsigned char *buf, size_t size,
  22. int timeout);
  23. extern my_bool my_io_wait_async(struct mysql_async_context *b,
  24. enum enum_vio_io_event event, int timeout);
  25. #ifdef HAVE_OPENSSL
  26. extern int my_ssl_read_async(struct mysql_async_context *b, SSL *ssl,
  27. void *buf, int size);
  28. extern int my_ssl_write_async(struct mysql_async_context *b, SSL *ssl,
  29. const void *buf, int size);
  30. #endif
  31. #endif /* MYSQL_ASYNC_H */