diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-07 22:28:15 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-08 14:02:42 -0800 |
| commit | d6ab6bca7a538c1a320ce00ab845e98c16649c94 (patch) | |
| tree | d4a8a4f8ac49eee54c2d9bbdf8f9da6c28362311 /src/core/sockimpl.h | |
| parent | 5223a142e38a320ce53097cea450d8ba7f175193 (diff) | |
| download | nng-d6ab6bca7a538c1a320ce00ab845e98c16649c94.tar.gz nng-d6ab6bca7a538c1a320ce00ab845e98c16649c94.tar.bz2 nng-d6ab6bca7a538c1a320ce00ab845e98c16649c94.zip | |
pipes and endpoints: support for inline allocations of transport data
This is a new transport API, which should make it easier for transports
to rely upon lifetime guarantees made by the common SP framework, thus
eliminating the need for transport specific reference counters, reap
lists, and similar.
The transport declares the size of the object in the ops vector (for
pipe, dialer, or listener), and the framework supplies one allocated
using the associated allocator.
For now these add the pipe object to the socket and endpoint using
linked linked lists. The plan is to transition those to reference
counts which should be lighter weight and free form locking issues.
The pipe teardown has been moved more fully to the reaper, to avoid
some of the deadlocks that can occur as nni_pipe_close can be called
from almost any context.
For now the old API is retained as well, but the intention is to convert
all the transports and then remove it.
Diffstat (limited to 'src/core/sockimpl.h')
| -rw-r--r-- | src/core/sockimpl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/sockimpl.h b/src/core/sockimpl.h index 801ef7b1..aeaa369b 100644 --- a/src/core/sockimpl.h +++ b/src/core/sockimpl.h @@ -132,12 +132,14 @@ extern void nni_dialer_destroy(nni_dialer *); extern void nni_dialer_timer_start(nni_dialer *); extern void nni_dialer_stop(nni_dialer *); +extern void nni_listener_start_pipe(nni_listener *, nni_pipe *); extern void nni_listener_add_pipe(nni_listener *, void *); extern void nni_listener_shutdown(nni_listener *); extern void nni_listener_reap(nni_listener *); extern void nni_listener_destroy(nni_listener *); extern void nni_listener_stop(nni_listener *); +extern void nni_pipe_add(nni_pipe *); extern void nni_pipe_remove(nni_pipe *); extern bool nni_pipe_is_closed(nni_pipe *); extern void nni_pipe_run_cb(nni_pipe *, nng_pipe_ev); |
