我在深流中有些困惑,是否可以从我的服务器与客户端通信?例如,有没有办法在服务器上做这样的事情?我目前正在浏览器中打开一个发布到其他客户端的客户端连接。我宁愿在我的服务器中有下面的代码。
var client = deepstream('localhost:6020').login()
var record = client.record.getRecord('new-record')
#Publish a message to all listeners of 'listen-channel' from my server?
record.set('listen-channel', 'message');
然后让客户听:
record.subscribe('listen-channel', function(value) {
console.log(value);