summaryrefslogtreecommitdiff
path: root/include/violite.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-11-17 19:36:47 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-11-17 21:40:20 +0000
commite0a00c5a2f276a4e314785a89c84f58d033b46b3 (patch)
treea746ae593da78aa53f8aa2bce342e4099d667a31 /include/violite.h
parentfaee08c10c767375aca26d126fff1a832330fc43 (diff)
downloadmariadb-git-e0a00c5a2f276a4e314785a89c84f58d033b46b3.tar.gz
MDEV-14412 Support TCP keepalive options
Based on pull request by Oleg Obleukhov https://github.com/MariaDB/server/pull/400
Diffstat (limited to 'include/violite.h')
-rw-r--r--include/violite.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/violite.h b/include/violite.h
index efdcb65286f..b6d0e130f0d 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -51,6 +51,14 @@ enum enum_vio_io_event
VIO_IO_EVENT_CONNECT
};
+struct vio_keepalive_opts
+{
+ int interval;
+ int idle;
+ int probes;
+};
+
+
#define VIO_LOCALHOST 1U /* a localhost connection */
#define VIO_BUFFERED_READ 2U /* use buffered read */
#define VIO_READ_BUFFER_SIZE 16384U /* size of read buffer */
@@ -84,6 +92,7 @@ my_bool vio_is_blocking(Vio *vio);
int vio_fastsend(Vio *vio);
/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
int vio_keepalive(Vio *vio, my_bool onoff);
+int vio_set_keepalive_options(Vio * vio, const struct vio_keepalive_opts *opts);
/* Whenever we should retry the last read/write operation. */
my_bool vio_should_retry(Vio *vio);
/* Check that operation was timed out */
@@ -214,7 +223,6 @@ enum SSL_type
SSL_TYPE_SPECIFIED
};
-
/* HFTODO - hide this if we don't want client in embedded server */
/* This structure is for every connection on both sides */
struct st_vio