diff options
Diffstat (limited to 'src/core/transport.c')
| -rw-r--r-- | src/core/transport.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/src/core/transport.c b/src/core/transport.c index 61ec5033..2e8dee7a 100644 --- a/src/core/transport.c +++ b/src/core/transport.c @@ -1,35 +1,33 @@ -/* - * Copyright 2016 Garrett D'Amore <garrett@damore.org> - * - * 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. - */ - -#include <string.h> +// +// Copyright 2016 Garrett D'Amore <garrett@damore.org> +// +// 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. +// #include "core/nng_impl.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 struct nni_transport nni_inproc_transport; +#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_transport nni_inproc_transport; -static struct nni_transport *transports[] = { +static nni_transport *transports[] = { &nni_inproc_transport, NULL }; -struct nni_transport * +nni_transport * nni_transport_find(const char *addr) { - /* address is of the form "<scheme>://blah..." */ + // address is of the form "<scheme>://blah..." const char *end; int len; int i; - struct nni_transport *ops; + nni_transport *ops; if ((end = strstr(addr, "://")) == NULL) { return (NULL); @@ -44,15 +42,13 @@ nni_transport_find(const char *addr) } -/* - * nni_transport_init initializes the entire transport subsystem, including - * each individual transport. - */ +// nni_transport_init initializes the entire transport subsystem, including +// each individual transport. void nni_transport_init(void) { int i; - struct nni_transport *ops; + nni_transport *ops; for (i = 0; (ops = transports[i]) != NULL; i++) { ops->tran_init(); @@ -64,7 +60,7 @@ void nni_transport_fini(void) { int i; - struct nni_transport *ops; + nni_transport *ops; for (i = 0; (ops = transports[i]) != NULL; i++) { if (ops->tran_fini != NULL) { |
