From 82bd40bc2b2d024ab7be0f27eea3f871f99cc213 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期三, 21 十月 2020 16:55:30 +0800 Subject: [PATCH] update --- src/socket/net_mod_server_socket_wrapper.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/socket/net_mod_server_socket_wrapper.c b/src/socket/net_mod_server_socket_wrapper.c index e69de29..cdd4c49 100644 --- a/src/socket/net_mod_server_socket_wrapper.c +++ b/src/socket/net_mod_server_socket_wrapper.c @@ -0,0 +1,20 @@ + +#include "net_mod_server_socket_wrapper.h" + +void *net_mod_server_socket_open(int port) { + net_mod_server_socket_t *sockt = (net_mod_server_socket_t *)malloc(sizeof(net_mod_server_socket_t)); + sockt->sockt = new NetModServerSocket(port); + return (void *)sockt; +} + +void net_mod_server_socket_close(void *_sockt) { + net_mod_server_socket_t *sockt = (net_mod_server_socket_t *)_sockt; + delete sockt->sockt; + free(sockt); + +} + +int net_mod_server_socket_start(void *_sockt) { + net_mod_server_socket_t *sockt = (net_mod_server_socket_t *)_sockt; + return sockt->sockt->start(); +} -- Gitblit v1.8.0