From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] Re: [PATCH 1/1] evio: allow not only SOCK_STREAM servers References: <0c0e2a63433e75e652153031d6b6b171845bdff6.1545047633.git.v.shpilevoy@tarantool.org> <20181218100830.47rl7hbtrmvnktd6@esperanza> From: Vladislav Shpilevoy Message-ID: <82ec28cf-8073-0241-3b9c-4aa3bcc2678b@tarantool.org> Date: Tue, 18 Dec 2018 13:18:55 +0300 MIME-Version: 1.0 In-Reply-To: <20181218100830.47rl7hbtrmvnktd6@esperanza> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit To: tarantool-patches@freelists.org, Vladimir Davydov List-ID: On 18/12/2018 13:08, Vladimir Davydov wrote: > 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? > Evio will allow UNIX sockets in future. But as you wish.