From e339f2d269fcaffed7beed67c3995fe3b67393eb Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 17 Dec 2022 21:24:04 +0800 Subject: Support on_connect function in server lib --- src/tsocket.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tsocket.c') diff --git a/src/tsocket.c b/src/tsocket.c index 8d8038a..9e55950 100644 --- a/src/tsocket.c +++ b/src/tsocket.c @@ -57,3 +57,8 @@ void tsocket_destroy(struct tsocket *sock) close(sock->fd); free(sock); } + +int tsocket_fd(tsocket_t *sock) +{ + return sock->fd; +} -- cgit v1.2.3