diff options
Diffstat (limited to 'cmd/srv9p/gnet.h')
-rw-r--r-- | cmd/srv9p/gnet.h | 20 |
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_ */ |