【发布时间】:2015-12-18 03:47:10
【问题描述】:
我正在尝试使用 PubNub 的在线状态功能并将收到的信息作为普通消息转发回来。下面是我的订阅功能,它工作正常,我的 here_now 没有给我任何东西。我想我想知道它们是如何以及为什么不同的。正确实施的指针也很有价值。
pubnub.here_now({
'channel' => @channel,
'callback' => lambda do |x|
## Relay Message
sendMessage(x)
return true
end
})
pubnub.subscribe({
'channel' => @channel,
'callback' => lambda do |message|
## Relay Message
sendMessage(message)
return true
end
})
【问题讨论】: