/* srv9p/gnet.h - libmisc/net.h implementation for libcr + GNU libc * * Copyright (C) 2024 Luke T. Shumaker * SPDX-Licence-Identifier: AGPL-3.0-or-later */ #ifndef _SRV9P_GNET_H_ #define _SRV9P_GNET_H_ #include /* for uint16_6 */ #include struct _gnet_tcp_conn { implements_net_stream_conn; int fd; }; struct gnet_tcp_listener { implements_net_stream_listener; int fd; struct _gnet_tcp_conn active_conn; }; 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 /* _SRV9P_GNET_H_ */