summaryrefslogtreecommitdiff
path: root/src/multiplex.h
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-14 08:50:45 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-14 08:50:45 -0400
commita2dad19f83ac00101489d7e00751ff9e17719344 (patch)
treebdaf339e76983ffe85d508e4ff3f3e4065624971 /src/multiplex.h
parent36f09a0c35657f5c7379624c8a2463aafb953bd4 (diff)
downloadlibnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.tar.gz
libnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.tar.bz2
libnaunet-a2dad19f83ac00101489d7e00751ff9e17719344.zip
Direct mode fixesHEADmaster
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/multiplex.h')
-rw-r--r--src/multiplex.h11
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);