From 09995a7ed8a07e56491101e650d8b1a0fd3f8479 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 4 Jun 2020 16:17:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84websocket=20c=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/source/mk_tcp.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/source/mk_tcp.cpp b/api/source/mk_tcp.cpp index 4795141e..793ad31f 100644 --- a/api/source/mk_tcp.cpp +++ b/api/source/mk_tcp.cpp @@ -144,10 +144,12 @@ API_EXPORT uint16_t API_CALL mk_tcp_server_start(uint16_t port, mk_tcp_type type s_tcp_server[type]->start >(port); break; case mk_type_ws: - s_tcp_server[type]->start>(port); + //此处你也可以修改WebSocketHeader::BINARY + s_tcp_server[type]->start >(port); break; case mk_type_wss: - s_tcp_server[type]->start>(port); + //此处你也可以修改WebSocketHeader::BINARY + s_tcp_server[type]->start >(port); break; default: return 0; @@ -208,8 +210,10 @@ TcpClientForC::Ptr *mk_tcp_client_create_l(mk_tcp_client_events *events, mk_tcp_ case mk_type_ssl: return (TcpClientForC::Ptr *)new shared_ptr >(new TcpSessionWithSSL(events)); case mk_type_ws: + //此处你也可以修改WebSocketHeader::BINARY return (TcpClientForC::Ptr *)new shared_ptr >(new WebSocketClient(events)); case mk_type_wss: + //此处你也可以修改WebSocketHeader::BINARY return (TcpClientForC::Ptr *)new shared_ptr >(new WebSocketClient(events)); default: return nullptr;