diff --git a/api/include/mk_tcp.h b/api/include/mk_tcp.h index 3bd81885..34ffb342 100644 --- a/api/include/mk_tcp.h +++ b/api/include/mk_tcp.h @@ -120,7 +120,7 @@ API_EXPORT void* API_CALL mk_tcp_session_get_user_data(mk_tcp_session session); * @param port 监听端口号,0则为随机 * @param type 服务器类型 */ -API_EXPORT uint16_t API_CALL mk_tcp_server_server_start(uint16_t port, mk_tcp_type type); +API_EXPORT uint16_t API_CALL mk_tcp_server_start(uint16_t port, mk_tcp_type type); /** * 监听tcp服务器事件 diff --git a/api/source/mk_tcp.cpp b/api/source/mk_tcp.cpp index 2d18557c..4517ea00 100644 --- a/api/source/mk_tcp.cpp +++ b/api/source/mk_tcp.cpp @@ -137,7 +137,7 @@ API_EXPORT void API_CALL mk_tcp_server_events_listen(const mk_tcp_session_events } } -API_EXPORT uint16_t API_CALL mk_tcp_server_server_start(uint16_t port, mk_tcp_type type){ +API_EXPORT uint16_t API_CALL mk_tcp_server_start(uint16_t port, mk_tcp_type type){ type = MAX(mk_type_tcp, MIN(type, mk_type_wss)); try { s_tcp_server[type] = std::make_shared(); diff --git a/api/tests/websocket.c b/api/tests/websocket.c index 7a95e586..82e2a878 100644 --- a/api/tests/websocket.c +++ b/api/tests/websocket.c @@ -172,7 +172,7 @@ void test_server(){ }; mk_tcp_server_events_listen(&events_server); - mk_tcp_server_server_start(80,TCP_TYPE); + mk_tcp_server_start(80, TCP_TYPE); } void test_client(){