diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-10-24 20:40:41 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-10-24 20:40:41 -0700 |
| commit | 5dc7bc188217004cba84d530cbffc18b1df8a331 (patch) | |
| tree | 2f11f6204e7c4b2a63483dccfaf5f0e768b23b7f /src | |
| parent | 4250fc119057eb6a6b534e9c0758488cc5fb034e (diff) | |
| download | nng-5dc7bc188217004cba84d530cbffc18b1df8a331.tar.gz nng-5dc7bc188217004cba84d530cbffc18b1df8a331.tar.bz2 nng-5dc7bc188217004cba84d530cbffc18b1df8a331.zip | |
Various man page fixups, add inproc header.
We added nng_inproc man page, and a header with an explicit
registration method for it. We also fixed up the markup on
several other pages, and corrected the include statements for
nng_zerotier.
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/core/init.c | 1 | ||||
| -rw-r--r-- | src/core/transport.c | 4 | ||||
| -rw-r--r-- | src/transport/inproc/inproc.c | 7 | ||||
| -rw-r--r-- | src/transport/inproc/inproc.h | 18 |
5 files changed, 31 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c67a22b..a5a49052 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -143,6 +143,9 @@ if (NNG_PLATFORM_WINDOWS) ) endif() +install(FILES transport/inproc/inproc.h + DESTINATION include/nng/transport/inproc) + if (NNG_ENABLE_ZEROTIER) set (NNG_SOURCES ${NNG_SOURCES} transport/zerotier/zerotier.c diff --git a/src/core/init.c b/src/core/init.c index cb242338..4a7fd974 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -9,6 +9,7 @@ // #include "core/nng_impl.h" + #include <stdio.h> #include <stdlib.h> diff --git a/src/core/transport.c b/src/core/transport.c index 2697ce74..6dcf4538 100644 --- a/src/core/transport.c +++ b/src/core/transport.c @@ -9,13 +9,13 @@ // #include "core/nng_impl.h" +#include "transport/inproc/inproc.h" #include <stdio.h> #include <string.h> // For now the list of transports is hard-wired. Adding new transports // to the system dynamically is something that might be considered later. -extern nni_tran nni_inproc_tran; extern nni_tran nni_tcp_tran; extern nni_tran nni_ipc_tran; @@ -138,7 +138,7 @@ nni_tran_sys_init(void) NNI_LIST_INIT(&nni_tran_list, nni_transport, t_node); nni_mtx_init(&nni_tran_lk); - if (((rv = nni_tran_register(&nni_inproc_tran)) != 0) || + if (((rv = nng_inproc_register()) != 0) || ((rv = nni_tran_register(&nni_ipc_tran)) != 0) || ((rv = nni_tran_register(&nni_tcp_tran)) != 0)) { nni_tran_sys_fini(); diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c index ae0972d5..c747f7dc 100644 --- a/src/transport/inproc/inproc.c +++ b/src/transport/inproc/inproc.c @@ -474,3 +474,10 @@ struct nni_tran nni_inproc_tran = { .tran_init = nni_inproc_init, .tran_fini = nni_inproc_fini, }; + + +int +nng_inproc_register(void) +{ + return (nni_tran_register(&nni_inproc_tran)); +} diff --git a/src/transport/inproc/inproc.h b/src/transport/inproc/inproc.h new file mode 100644 index 00000000..9538b06f --- /dev/null +++ b/src/transport/inproc/inproc.h @@ -0,0 +1,18 @@ +// +// Copyright 2017 Garrett D'Amore <garrett@damore.org> +// Copyright 2017 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 NNG_TRANSPORT_INPROC_INPROC_H +#define NNG_TRANSPORT_INPROC_INPROC_H + +// inproc transport. This is used for intra-process communication. + +extern int nng_inproc_register(void); + +#endif // NNG_TRANSPORT_INPROC_INPROC_H |
