diff options
Diffstat (limited to 'cmd/srv9p/gnet.c')
-rw-r--r-- | cmd/srv9p/gnet.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/srv9p/gnet.c b/cmd/srv9p/gnet.c index 5072428..2bed355 100644 --- a/cmd/srv9p/gnet.c +++ b/cmd/srv9p/gnet.c @@ -69,7 +69,7 @@ static inline bool RUN_PTHREAD(void *(*fn)(void *), void *args) { return false; } -/* vtables ********************************************************************/ +/* init() ( AKA socket(3) + listen(3) )****************************************/ static struct libnet_conn *gnet_accept(struct libnet_listener *_listener); static ssize_t gnet_read(struct libnet_conn *conn, void *buf, size_t count); @@ -86,8 +86,6 @@ static struct libnet_conn_vtable gnet_conn_vtable = { .close = gnet_close, }; -/* listen() *******************************************************************/ - void gnet_listener_init(struct gnet_listener *self, uint16_t port) { int listenerfd; union { @@ -175,7 +173,7 @@ static void *_pthread_read(void *_args) { }; static ssize_t gnet_read(struct libnet_conn *_conn, void *buf, size_t count) { - struct gnet_conn *conn = (struct gnet_conn *)_conn; + struct _gnet_conn *conn = (struct _gnet_conn *)_conn; assert(conn); ssize_t ret; @@ -225,7 +223,7 @@ static void *_pthread_write(void *_args) { }; static ssize_t gnet_write(struct libnet_conn *_conn, void *buf, size_t count) { - struct gnet_conn *conn = (struct gnet_conn *)_conn; + struct _gnet_conn *conn = (struct _gnet_conn *)_conn; assert(conn); ssize_t ret; @@ -247,7 +245,7 @@ static ssize_t gnet_write(struct libnet_conn *_conn, void *buf, size_t count) { /* close() ********************************************************************/ static int gnet_close(struct libnet_conn *_conn, bool rd, bool wr) { - struct gnet_conn *conn = (struct gnet_conn *)_conn; + struct _gnet_conn *conn = (struct _gnet_conn *)_conn; assert(conn); int how; |