用 python 编写的类似 Javascript 的 TCP 套接字客户端?

标签 javascript python events tcp tcpclient

在页面http://pypi.python.org/pypi/websocket-client/0.4第一个片段(“低级 API 示例”)非常类似于 http://docs.python.org/library/socket.html#example 中的客户端示例.

我感兴趣的是,是否有可能制作一个甚至被驱动的 TCP 客户端,例如第一个网页上的“JavaScript websocket-like API example”,它在例如消息到达时执行操作.我怎样才能做到这一点? 我找到了 this example使用扭曲。还有其他(更好的?)方法吗?

最佳答案

关于用 python 编写的类似 Javascript 的 TCP 套接字客户端?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7010745/

相关文章:

javascript - Event.target.id 返回空字符串?

javascript - 使用 Chosen 插件将 html 下拉列表修改为可搜索下拉列表

javascript - redux、react-redux、redux-thunk 之间有什么区别?

c# - Python 是一种托管代码语言吗?

cordova - PhoneGap 离线事件触发太慢

c# - 为什么我的 C# Remoting 对象超时,即使 Lifetime 返回 null?

javascript - 更改我的 Web 应用程序的浏览器后退按钮行为?

python - 如何在 plotly 和 python 中使用 make_subplot 绘制多个图表

python - 使用正则表达式查找并替换每个匹配的任意数量的元素

javascript - jquery.mousewheel.js iPhone 滚动