From d35f1d0bfe2f1400bb399f760788892ae52563b3 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 6 Mar 2020 11:11:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8F=A3=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/include/mk_tcp.h | 2 +- api/source/mk_tcp.cpp | 2 +- api/tests/websocket.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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(){