From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 18 Dec 2018 13:08:30 +0300 From: Vladimir Davydov Subject: Re: [PATCH 1/1] evio: allow not only SOCK_STREAM servers Message-ID: <20181218100830.47rl7hbtrmvnktd6@esperanza> References: <0c0e2a63433e75e652153031d6b6b171845bdff6.1545047633.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c0e2a63433e75e652153031d6b6b171845bdff6.1545047633.git.v.shpilevoy@tarantool.org> To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org List-ID: On Mon, Dec 17, 2018 at 02:55:44PM +0300, Vladislav Shpilevoy wrote: > evio is a useful tool for creating servers. Evio sets > all necessary flags, retries bind, parses URI. But it > does not work with SOCK_DGRAM sockets - SOCK_STREAM is > hardcoded. SWIM is going to use SOCK_DGRAM, and this > patch makes it possible to bind datagram sockets. > > Needed for #3234 > --- > https://github.com/tarantool/tarantool/tree/gerold103/gh-3234-swim-second-preparation > https://github.com/tarantool/tarantool/issues/3234 > > src/box/iproto.cc | 4 ++-- > src/coio.cc | 4 ++-- > src/evio.c | 48 +++++++++++++++++++++++++++++++++++------------ > src/evio.h | 19 ++++++++++++++++--- > 4 files changed, 56 insertions(+), 19 deletions(-) I don't think it's a good idea to reuse evio_service_bind() for SWIM configuration as it's blocking (it uses getaddrinfo). Anyway, do we really need this extra level of abstraction? Wouldn't it be more straightforward to use sio/ev/coio directly instead?