From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladislav Shpilevoy Subject: [PATCH v4 02/12] evio: expose evio_setsockopt_server function Date: Thu, 31 Jan 2019 00:28:31 +0300 Message-Id: <95b265f0fff41d30076f92e282bbcbda96984f72.1548883137.git.v.shpilevoy@tarantool.org> In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org, vdavydov.dev@gmail.com List-ID: It is going to be used in SWIM module to set UDP server socket options. Apparently this function sets some usefull flags like NONBLOCK, REUSEADDR. --- src/evio.c | 3 +-- src/evio.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/evio.c b/src/evio.c index 9ca14c45c..8610dbbe7 100644 --- a/src/evio.c +++ b/src/evio.c @@ -129,8 +129,7 @@ evio_setsockopt_client(int fd, int family, int type) return 0; } -/** Set options for server sockets. */ -static int +int evio_setsockopt_server(int fd, int family, int type) { int on = 1; diff --git a/src/evio.h b/src/evio.h index 69d641a60..872a21ab6 100644 --- a/src/evio.h +++ b/src/evio.h @@ -157,6 +157,10 @@ evio_timeout_update(ev_loop *loop, ev_tstamp start, ev_tstamp *delay) int evio_setsockopt_client(int fd, int family, int type); +/** Set options for server sockets. */ +int +evio_setsockopt_server(int fd, int family, int type); + #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */ -- 2.17.2 (Apple Git-113)