From e7378b9f9b122e05baebce387fe9c3844c0736b6 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Wed, 23 Oct 2024 15:21:09 -0600 Subject: wip --- cmd/srv9p/gnet.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'cmd/srv9p/gnet.h') 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 -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_ */ -- cgit v1.2.3-2-g168b