diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-06-26 17:39:17 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-06-27 17:28:05 -0700 |
| commit | 251553b13e6bc8019914b9edd1292f97e856dd43 (patch) | |
| tree | 9193b8b4d4df86253f0a469cd96d8bb304a64c82 /src/core/dialer.h | |
| parent | 91f9061ad9289afffb0111c03a8390d0f82d7114 (diff) | |
| download | nng-251553b13e6bc8019914b9edd1292f97e856dd43.tar.gz nng-251553b13e6bc8019914b9edd1292f97e856dd43.tar.bz2 nng-251553b13e6bc8019914b9edd1292f97e856dd43.zip | |
fixes #522 Separate out the endpoint plumbing
This separates the plumbing for endpoints into distinct
dialer and listeners. Some of the transports could benefit
from further separation, but we've done some rather larger
separation e.g. for the websocket transport.
IPC would be a good one to update later, when we start looking
at exposing a more natural underlying API.
Diffstat (limited to 'src/core/dialer.h')
| -rw-r--r-- | src/core/dialer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/core/dialer.h b/src/core/dialer.h new file mode 100644 index 00000000..56b0fb1b --- /dev/null +++ b/src/core/dialer.h @@ -0,0 +1,32 @@ +// +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> +// +// This software is supplied under the terms of the MIT License, a +// copy of which should be located in the distribution where this +// file was obtained (LICENSE.txt). A copy of the license may also be +// found online at https://opensource.org/licenses/MIT. +// + +#ifndef CORE_DIALER_H +#define CORE_DIALER_H + +extern int nni_dialer_sys_init(void); +extern void nni_dialer_sys_fini(void); +extern int nni_dialer_find(nni_dialer **, uint32_t); +extern int nni_dialer_hold(nni_dialer *); +extern void nni_dialer_rele(nni_dialer *); +extern uint32_t nni_dialer_id(nni_dialer *); +extern int nni_dialer_create(nni_dialer **, nni_sock *, const char *); +extern int nni_dialer_shutdown(nni_dialer *); +extern void nni_dialer_close(nni_dialer *); +extern int nni_dialer_start(nni_dialer *, int); +extern void nni_dialer_list_init(nni_list *); +extern void nni_dialer_remove_pipe(nni_dialer *, nni_pipe *); + +extern int nni_dialer_setopt( + nni_dialer *, const char *, const void *, size_t, nni_opt_type); +extern int nni_dialer_getopt( + nni_dialer *, const char *, void *, size_t *, nni_opt_type); + +#endif // CORE_DIALER_H |
