summaryrefslogtreecommitdiff
path: root/cmd/srv9p/gnet.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-23 15:21:09 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-23 15:21:09 -0600
commite7378b9f9b122e05baebce387fe9c3844c0736b6 (patch)
treece921a21811cb4ded792f61f2d933cf4e8f87a96 /cmd/srv9p/gnet.h
parent9940877f4bb44bc69fecf7fb5afcf3cbab90f088 (diff)
wip
Diffstat (limited to 'cmd/srv9p/gnet.h')
-rw-r--r--cmd/srv9p/gnet.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/cmd/srv9p/gnet.h b/cmd/srv9p/gnet.h
index 01f2d40..4380c1d 100644
--- a/cmd/srv9p/gnet.h
+++ b/cmd/srv9p/gnet.h
@@ -11,19 +11,27 @@
#include <libmisc/net.h>
-struct _gnet_conn {
- implements_net_conn;
+struct _gnet_tcp_conn {
+ implements_net_stream_conn;
int fd;
};
-struct gnet_listener {
- implements_net_listener;
+struct gnet_tcp_listener {
+ implements_net_stream_listener;
int fd;
- struct _gnet_conn active_conn;
+ struct _gnet_tcp_conn active_conn;
};
-void gnet_listener_init(struct gnet_listener *self, uint16_t port);
+void gnet_tcp_listener_init(struct gnet_tcp_listener *self, uint16_t port);
+
+struct gnet_udp_conn {
+ implements_net_packet_conn;
+
+ int fd;
+};
+
+void gnet_udp_conn_init(struct gnet_udp_conn *self, uint16_t port);
#endif /* _GNET_H_ */