diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-17 23:57:09 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-18 01:57:35 -0700 |
| commit | 446b150032f24c34644f0ab91ac6ab9206250865 (patch) | |
| tree | e47b4e3812016716187201961c43b9e407a3ed50 /src/core/transport.c | |
| parent | 76c1fc80c931b086493835d037245ebbb5f8d406 (diff) | |
| download | nng-446b150032f24c34644f0ab91ac6ab9206250865.tar.gz nng-446b150032f24c34644f0ab91ac6ab9206250865.tar.bz2 nng-446b150032f24c34644f0ab91ac6ab9206250865.zip | |
Endpoint API completely implemented.
This supports creating listeners and dialers, managing options
on them (though only a few options are supported at present),
starting them and closing them, all independently.
Diffstat (limited to 'src/core/transport.c')
| -rw-r--r-- | src/core/transport.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/transport.c b/src/core/transport.c index 2f373f9a..3130ae26 100644 --- a/src/core/transport.c +++ b/src/core/transport.c @@ -89,6 +89,27 @@ nni_tran_find(const char *addr) return (NULL); } +int +nni_tran_chkopt(int o, const void *v, size_t sz) +{ + nni_transport *t; + int rv = NNG_ENOTSUP; + nni_mtx_lock(&nni_tran_lk); + NNI_LIST_FOREACH (&nni_tran_list, t) { + int x; + if (t->t_tran.tran_chkopt == NULL) { + continue; + } + if ((x = t->t_tran.tran_chkopt(o, v, sz)) != NNG_ENOTSUP) { + if ((rv = x) != 0) { + break; + } + } + } + nni_mtx_unlock(&nni_tran_lk); + return (rv); +} + // nni_tran_sys_init initializes the entire transport subsystem, including // each individual transport. int |
