public override async Task <string> HandleMessage(WebSocketConnection connection, BinaryReader reader) { int count = Math.Min(reader.ReadInt32(), 256); for (int i = 0; i < count; i++) { Guid targetID = ReadMinecraftUUIDFromBinaryReader(reader); PubSubManager.Subscribe(targetID, connection.playerID, connection); Logger.LogMessage("Subscribing user " + connection.playerID + " to " + targetID); } return(string.Empty); }
private void subscribeToolStripMenuItem_Click(object sender, EventArgs e) { // subscibe to a node var pNode = treeNodes.SelectedNode as DiscoNode; if (pNode != null) { var myBareJid = new Jid { User = XmppClient.Username, Server = XmppClient.XmppDomain }; _pm.Subscribe(cboService.Text, pNode.Node, myBareJid, SubscribeResult, pNode.Node); } }
public void Subscribe(string node, OnXmppMsgHandler handler) { m_psMgr.OnEvent += new EventHandler <MessageEventArgs>(handler); m_psMgr.Subscribe(m_psJid, node, m_user + "@" + m_server, new EventHandler <IqEventArgs>(OnSubscribe)); m_subNH.Add(new SubNodeHandler(node, handler)); }
public void Subscribe(string key) { pubSubMan.Subscribe(key, this); }