curlシミュレーションlibwebsocketサービスエンドプログラムのテスト

1998 ワード

cmakeでmake libwebsocketのテストプログラムをコンパイルしbin/libwebsockets-test-serverを実行
Webページで開くhttp://192.168.1.194:7681/テストプログラムが表示されます
curl模拟测试 libwebsocket服务端程序_第1张图片
commviewでバッグをつかむ
curl模拟测试 libwebsocket服务端程序_第2张图片
CURLシミュレーション送信:
curl -i -N \
-H "GET /xxx HTTP/1.1" \
-H "Host: 192.168.1.194:7681" \
-H "Connection: Upgrade" \
-H "Pragma: no-cache" \
-H "Cache-Control: no-cache" \
-H "Upgrade: websocket" \
-H "Origin: http://192.168.1.194:7681" \
-H "Sec-WebSocket-Version: 13" \
-H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36" \
-H "Accept-Encoding: gzip, deflate, sdch" \
-H "Accept-Language: zh-CN,zh;q=0.8" \
-H "Cookie: test=LWS_1467015783_202369_COOKIE" \
-H "Sec-WebSocket-Key: HQZPuX/AaPXjxPs4qms8ew==" \
-H "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits" \
-H "Sec-WebSocket-Protocol: dumb-increment-protocol" \
http://192.168.1.194:7681/xxx

curl模拟测试 libwebsocket服务端程序_第3张图片