From fc065b708072de0b3a8aced5e033bc6f34b545c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=A6=E4=B9=85=E9=BE=99?= Date: Tue, 7 Mar 2023 18:28:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0MacOS=20=E8=B0=83=E8=AF=95Web?= =?UTF-8?q?Socket=E6=96=B9=E6=B3=95=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 78f4898..039a254 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,10 @@ PHP WebSocket 指令与签名demo sign_message.php +MacOS 调试WebSocket方法 + + 安装node:brew install node + 安装wscat:npm install -g wscat + 使用wscat链接WebSocket:wscat -c ws://localhost:8080/ws + 发送消息给服务器:{"TaskData":{"command":"lastCall","excluded_filename":"lastCall.txt","batch_filename":"Communication_definition_SMS_1_wemedia_20230303185518.txt","data_filename":"Communication_targets_SMS_1_wemedia_20230303185518.txt"},"signature":{"signature":"7fb34f2cb94c1ee5d969a1ee974c93aff0e2b1f31f3a54b350202672b041ff6c","timestamp":1678183659,"nonce":"dd29nwj4D9rosZ=p-UL15ubUSpc0)AIu))@Q-Taln(ByynnQlkBVwnRXkJfXeUB7"}} +