1
我一直在使用gevent-websocket一段时间,但由于某种原因,它在OSX和Linux上都神秘破灭。 bitbucket和pypi上的人没有回应它就驳回了我的请求,就像在stackoverflow上的人一样。我打算编写自己的WebSocket实现,但我需要访问管理原始数据发送和接收的原始连接对象(如来自套接字模块的套接字对象)。我在哪里可以找到这瓶装?我在寻找的代码可能看起来像这样的:Python瓶发送原始响应套接字
@route("/websocket")
def ws():
raw_conn = ??? # socket object from socket module
# initialize websocket here, following protocols and then send messages
while True:
raw_conn.send(raw_conn.recv()) # Simple echo
你介意链接到你贴,关于如何SO问题'gevent-websocket'坏了?我很好奇看到细节。谢谢! –
https://stackoverflow.com/questions/40876032/gevent-websocket-throws-protocolerror-when-socket-receive-is-called –