summaryrefslogtreecommitdiff
path: root/src/multiplex.h
diff options
context:
space:
mode:
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);