【发布时间】:2019-12-26 02:09:11
【问题描述】:
我正在尝试使用推送器连接到 Liquid 交易所的 Stream API。 Documentation here
我已经构建了一个符合 Pusher 库文档的函数。 Link to that here 我当前的代码如下所示:
require 'pusher-client'
channels_client = PusherClient::Socket.new('LIQUID', {
ws_host: 'tap.liquid.com'
})
并运行它给我一个错误消息:
D,[2019-08-20Txx:xx:xx.xxxxxx #xxxxx] 调试 -- : 绑定 pusher:connection_builted 到 pusher_global_channel
D,[2019-08-20Txx:xx:xx.xxxxxx #xxxxx] 调试 -- : 绑定 pusher:connection_disconnected 到 pusher_global_channel
D,[2019-08-20Txx:xx:xx.xxxxxx #xxxxx] 调试 -- : 绑定推送器:错误 到 pusher_global_channel
D,[2019-08-20Txx:xx:xx.xxxxxx #xxxxx] 调试 -- : 绑定推送器:ping 到 pusher_global_channel
如果我尝试在第一个命令之后运行它:
channels_client.connect
...它拒绝连接。
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/pusher-client-0.6.2/lib/pusher-client/websocket.rb:17:in `initialize': 无法建立连接,因为目标机器 主动拒绝了。 - 连接(2)“tap.liquid.com”端口 80 (Errno::ECONNREFUSED)
【问题讨论】: