2012-10-01 122 views
0

我试图使用PubNub的存在功能,并将接收到的信息作为普通消息进行转发。下面是我的订阅功能正常工作,以及我的here_now,不给我任何东西。我想我想知道的是他们如何以及为什么会有所不同。正确实施的指针也很有价值。存在,PubNub +红宝石

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 
}) 

回答

0

对于您所提供什么非常简单的测试,你将要运行一个Ruby脚本的认购,第一,然后分别运行在here_now脚本发布脚本。