Poloniex通过高速公路断开与对等tcp的连接来推送WAMP API [英] Poloniex Push WAMP API through Autobahn dropping connection to peer tcp

查看:159
本文介绍了Poloniex通过高速公路断开与对等tcp的连接来推送WAMP API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用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库的.com 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)

通过 https://github.com/crossbario/crossbar/issues/930 <找到的解决方案.可能需要它的原因可能与DNS路由缓慢有关,而DNS路由花费的时间比默认握手时间长.

Solution found via https://github.com/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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆