diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-05 20:22:36 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-05 20:22:36 -0700 |
| commit | 8811317e2da3b5a21d6caab0cc0e12aad417edd6 (patch) | |
| tree | 3ee093b515d3b6d69554bf7913c3626a5605d178 /src/platform/posix/posix_aio.h | |
| parent | 5ee6713c34963ed400c8886213ed2ee53c367c74 (diff) | |
| download | nng-8811317e2da3b5a21d6caab0cc0e12aad417edd6.tar.gz nng-8811317e2da3b5a21d6caab0cc0e12aad417edd6.tar.bz2 nng-8811317e2da3b5a21d6caab0cc0e12aad417edd6.zip | |
Make ipc work 100% async.
The connect & accept logic for IPC is now fully asynchronous.
This will serve as a straight-forward template for TCP. Note that
the upper logic still uses a thread to run this "synchronously", but
that will be able to be removed once the last transport (TCP) is made
fully async.
The unified ipcsock is also now separated, and we anticipate being
able to remove the posix_sock.c logic shortly. Separating out the
endpoint logic from the pipe logic helps makes things clearer, and
may faciliate a day where endpoints have multiple addresses (for
example with a connect() endpoint that uses a round-robin DNS list
and tries to run the entire list in parallel, stopping with the first
connection made.)
The platform header got a little cleanup while we were here.
Diffstat (limited to 'src/platform/posix/posix_aio.h')
| -rw-r--r-- | src/platform/posix/posix_aio.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platform/posix/posix_aio.h b/src/platform/posix/posix_aio.h index 186f586f..13559c08 100644 --- a/src/platform/posix/posix_aio.h +++ b/src/platform/posix/posix_aio.h @@ -30,10 +30,14 @@ extern void nni_posix_pipedesc_recv(nni_posix_pipedesc *, nni_aio *); extern void nni_posix_pipedesc_send(nni_posix_pipedesc *, nni_aio *); extern void nni_posix_pipedesc_close(nni_posix_pipedesc *); -extern int nni_posix_epdesc_init(nni_posix_epdesc **, int); +extern int nni_posix_epdesc_init(nni_posix_epdesc **, const char *); +extern const char *nni_posix_epdesc_url(nni_posix_epdesc *); +extern void nni_posix_epdesc_set_local(nni_posix_epdesc *, void *, int); +extern void nni_posix_epdesc_set_remote(nni_posix_epdesc *, void *, int); extern void nni_posix_epdesc_fini(nni_posix_epdesc *); extern void nni_posix_epdesc_close(nni_posix_epdesc *); extern void nni_posix_epdesc_connect(nni_posix_epdesc *, nni_aio *); +extern int nni_posix_epdesc_listen(nni_posix_epdesc *); extern void nni_posix_epdesc_accept(nni_posix_epdesc *, nni_aio *); #endif // PLATFORM_POSIX_AIO_H |
