[nanomsg] Re: libnng: POSIX transports are now ?kind-of? asynchronous

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Mon, 10 Apr 2017 12:07:19 -0700

Thanks, yeah this should be ETIMEDOUT instead of ETIME.

On Mon, Apr 10, 2017 at 11:28 AM, Eduardo Morras <
dmarc-noreply@xxxxxxxxxxxxx> wrote:

On Wed, 29 Mar 2017 17:13:08 -0700
"Garrett D'Amore" <garrett@xxxxxxxxxx> wrote:

I?ve updated the ?asyncagain? branch of libnng to make ipc and tcp
work properly in POSIX systems (Windows is still busted ? won?t even
compile I?m sure).  These use an asychronous model for send/recv
(which right now is handled by threads under the hood, but this
change greatly facilitates enabling other forms of asynchronous I/O
using poll, select, epoll, kqueue, etc.)

I just wanted to post this update- so folks know that in spite of the
sporadic nature of progress, progress is still being made.

I know it's a work in progress, but if I can comment/say something,
libnng (master and asyncagain branchs) don't compile under FreeBSD. The
problem is that FreeBSD doesn't implement the optional Posix streams,
and error code ETIME in errno.h (and others stream related error codes)
is not defined. The error is :

nng/src/platform/posix/posix_debug.c:81:4: error: use of undeclared
identifier 'ETIME' { ETIME,           NNG_ETIMEDOUT    },
                     ^

NetBSD and (iirc) OpenBSD have a define for ETIME, but FreeBSD not.
Perhaps checking if ETIME is not defined and defining it to ETIMEDOUT
at CMake level or adding next lines to posix_debug.c will fix it.

#ifndef ETIME
#define ETIME ETIMEDOUT
#endif

Stay tuned for more info?.

And thanks again for your hard work.

 - Garrett

---   ---
Eduardo Morras <emorrasg@xxxxxxxx>


Other related posts: