测试websocket的python脚本。
WebSocketCommandline的Python项目详细描述
websocketcommandline
WebSocketCommandLine是一个命令行工具,可以方便地测试 shell中websocket客户机/服务器与python的连接。
兼容性
使用:*python 3.5.2*python 2.7.12进行测试
安装
打它!
&> pip install WebSocketCommandline
使用量
试试看!
&> websocket_tester
更多选项
websocket_tester将自动启动websocket服务器 启动。更改默认服务器端口:
&> websocket_tester --port 12345
除了端口之外,还可以更改 服务器:
&> websocket_tester --port 12345 --url-root iamawebsocket This will make the server listen on ws://localhost:12345/iamawebsocket
websocket_tester具有内置的服务器和客户端支持,顺序如下 连接到服务器:
# After starting the tool. # Assumed the tool starts with --port 12345 --url-root iamawebsocket >> connect 127.0.0.1 12345 iamawebsocket
列出所有连接的客户端/服务器
# After starting the tool.
>> list
向客户机/服务器发送文本消息
# After starting the tool. # The client_id can be found in 'list' command >> send [client_id][text you want to send]
待办事项
- 更好的日志/输出处理
- [删除线:可由PIP安装]
- [三振:测试了python2]
- …
许可证
麻省理工学院许可证(MIT)
版权所有(c)2016 OWWLO
根据麻省理工学院的许可证。请参阅顶级文件许可证。
那时候我们说话都喜欢用终于,就像终于放假了,终于毕业了,终于离开这里了,终于过年了,仿佛任何的告别都像一种解脱。最后我们才发现,那些自以为是的如释重负,才是让人想念的东西。没什么会等你。就像所有曲终人散和分道扬镳,到最后可惜的不是离[谚]