diff --git a/frameworks/js/napi/websocket/websocket_module/src/websocket_client.cpp b/frameworks/js/napi/websocket/websocket_module/src/websocket_client.cpp index ca9b52d0b8203fe4d7ec2b3e7f57b27430a61daf..a7760948bfe5a1b39ec816b228668eec045fe8e3 100644 --- a/frameworks/js/napi/websocket/websocket_module/src/websocket_client.cpp +++ b/frameworks/js/napi/websocket/websocket_module/src/websocket_client.cpp @@ -794,7 +794,7 @@ int WebSocketClient::ConnectEx(std::string url, struct OpenOptions options) int WebSocketClient::SendEx(char *data, size_t length) { - NETSTACK_LOGI("WebSocketClient::SendEx start %{public}s, %{public}d", data, length); + NETSTACK_LOGI("WebSocketClient::SendEx start %{public}s, %{public}zu", data, length); if (data == nullptr) { return WebSocketErrorCode::WEBSOCKET_SEND_DATA_NULL; } @@ -823,7 +823,7 @@ int WebSocketClient::SendEx(char *data, size_t length) } this->GetClientContext()->Push(dataCopy, length, protocol); this->GetClientContext()->TriggerWritable(); - NETSTACK_LOGI("WebSocketClient::Send end %{public}s, %{public}s, %{public}d", dataCopy, data, length); + NETSTACK_LOGI("WebSocketClient::Send end %{public}s, %{public}s, %{public}zu", dataCopy, data, length); return WebSocketErrorCode::WEBSOCKET_NONE_ERR; } diff --git a/interfaces/innerkits/websocket_native/libwebsocket_native.map b/interfaces/innerkits/websocket_native/libwebsocket_native.map index b2604e089da8b440cc6097ab3452fffdddccb3fa..9d06ae0a0f862220f7fe46c20b874b3b78a85fa5 100644 --- a/interfaces/innerkits/websocket_native/libwebsocket_native.map +++ b/interfaces/innerkits/websocket_native/libwebsocket_native.map @@ -20,10 +20,13 @@ "OHOS::NetStack::WebSocketClient::WebSocketClient::ConnectEx(std::__h::basic_string, std::__h::allocator>, OHOS::NetStack::WebSocketClient::OpenOptions)"; "OHOS::NetStack::WebSocketClient::WebSocketClient::GetClientContext() const"; "OHOS::NetStack::WebSocketClient::WebSocketClient::Send(char*, unsigned int)"; + "OHOS::NetStack::WebSocketClient::WebSocketClient::Send(char*, unsigned long)"; "OHOS::NetStack::WebSocketClient::WebSocketClient::SendEx(char*, unsigned int)"; + "OHOS::NetStack::WebSocketClient::WebSocketClient::SendEx(char*, unsigned long)"; "OHOS::NetStack::WebSocketClient::WebSocketClient::Close(OHOS::NetStack::WebSocketClient::CloseOption)"; "OHOS::NetStack::WebSocketClient::WebSocketClient::CloseEx(OHOS::NetStack::WebSocketClient::CloseOption)"; "OHOS::NetStack::WebSocketClient::WebSocketClient::Registcallback(void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::OpenResult), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, std::__h::basic_string, std::__h::allocator> const&, unsigned int), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::ErrorResult), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::CloseResult))"; + "OHOS::NetStack::WebSocketClient::WebSocketClient::Registcallback(void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::OpenResult), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, std::__h::basic_string, std::__h::allocator> const&, unsigned long), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::ErrorResult), void (*)(OHOS::NetStack::WebSocketClient::WebSocketClient*, OHOS::NetStack::WebSocketClient::CloseResult))"; "OHOS::NetStack::WebSocketClient::WebSocketClient::Destroy()"; "OHOS::NetStack::WebSocketServer::WebSocketServer::WebSocketServer()"; "OHOS::NetStack::WebSocketServer::WebSocketServer::~WebSocketServer()"; diff --git a/interfaces/kits/c/net_websocket/BUILD.gn b/interfaces/kits/c/net_websocket/BUILD.gn index 017529a02ad9d613e6ca1b6fe95906e02bb0091a..35ce1ff78e36dd40b279dd72445561577c8f973c 100644 --- a/interfaces/kits/c/net_websocket/BUILD.gn +++ b/interfaces/kits/c/net_websocket/BUILD.gn @@ -38,6 +38,7 @@ ohos_shared_library("net_websocket") { deps = [ "$NETSTACK_DIR/interfaces/innerkits/websocket_native:websocket_native", + "$NETSTACK_DIR/frameworks/js/napi/websocket:websocket", "$NETSTACK_DIR/utils/napi_utils:napi_utils", ]