diff options
| author | 2026-09-14 08:50:45 -0400 | |
|---|---|---|
| committer | 2026-09-14 08:50:45 -0400 | |
| commit | a2dad19f83ac00101489d7e00751ff9e17719344 (patch) | |
| tree | bdaf339e76983ffe85d508e4ff3f3e4065624971 /src/multiplex.h | |
| parent | 36f09a0c35657f5c7379624c8a2463aafb953bd4 (diff) | |
| download | libnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.tar.gz libnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.tar.bz2 libnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.zip | |
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/multiplex.h')
| -rw-r--r-- | src/multiplex.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/multiplex.h b/src/multiplex.h index 946e570..255591a 100644 --- a/src/multiplex.h +++ b/src/multiplex.h @@ -8,11 +8,16 @@ #include "packet_stream.h" struct nn_multiplex_direct { - struct nn_packet_stream *closing_bridge; bool (*connection_callback)(void *, u8 id, struct nn_packet_stream *stream); void *userdata; }; +struct nn_multiplex_bridge { + bool broken; + struct nn_packet_stream *bridge; + array(struct nn_packet *) queue; +}; + struct nn_multiplex_socket; struct nn_multiplex_connection { struct nn_socket sock; @@ -36,5 +41,5 @@ void nn_multiplex_socket_close(struct nn_multiplex_socket *multi); void nn_multiplex_direct_init(bool (*connection_callback)(void *, u8, struct nn_packet_stream *), void *userdata); void nn_multiplex_direct_connect(struct nn_packet_stream *client, u8 id); void nn_multiplex_direct_reconnect(struct nn_packet_stream *client); -struct nn_packet_stream *nn_multiplex_direct_get_bridge(void); -void nn_multiplex_direct_close(void); + +void nn_multiplex_bridge_free(struct nn_multiplex_bridge *bridge); |