我尝试使用python连接到poloniex中的Push API,并按照此处答案的说明进行操作:
I tried to connect to the Push API in poloniex using python and followed the instructions on the answer here:
如何连接到poloniex使用python库的 websocket api
但是我仍然收到此错误:
However I keep getting this error:
2017-06-25T04:07:04使用中止==断开与对等方tcp:104.20.13.48:443的连接真:WebSocket打开握手超时(对等未及时完成打开握手)
2017-06-25T04:07:04 dropping connection to peer tcp:104.20.13.48:443 with abort=True: WebSocket opening handshake timeout (peer did not finish the opening handshake in time)
有人知道这是怎么回事吗?我无法从在线文档中找到答案.谢谢!
Anyone know what's going on here? I can't figure it out from online documentation. Thanks!
推荐答案按照@Cyphrags的建议,我可以通过使用factory.setProtocolOptions
As per @Cyphrags suggestion, I was able to get my autobahn websocket to work outside of localhost by increasing openHandshakeTimeout with factory.setProtocolOptions
factory.protocol = MyClientProtocol factory.setProtocolOptions(failByDrop=False, openHandshakeTimeout=90, closeHandshakeTimeout=5)
factory.protocol = MyClientProtocol factory.setProtocolOptions(failByDrop=False, openHandshakeTimeout=90, closeHandshakeTimeout=5)
通过 github/crossbario/crossbar/issues/930 <找到的解决方案.可能需要它的原因可能与DNS路由缓慢有关,而DNS路由花费的时间比默认握手时间长.
Solution found via github/crossbario/crossbar/issues/930. Perhaps the reason it is needed has something to do with slow DNS routing taking longer than the default handshake time.
更多推荐
Poloniex通过高速公路断开与对等tcp的连接来推送WAMP API
发布评论