You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the example code, the message received (IMessage), which has a clientId parameter, is always null. Should this not be containing the client ID of the sender? Thus, it should never be null??
public class Listener : IMessageListener
{
//private BayeuxClient client;
public void onMessage(IClientSessionChannel channel, IMessage message)
{
IDictionary ss = (IDictionary)message.DataAsDictionary;
String foo = (String)ss["foo"];
String senderClientId = message.ClientId; // is always null
if (senderClientId.Equals(Form1.clientId)) //should crash here
{
MessageBox.Show("I sent a message to myself");
}
else
{
MessageBox.Show(ss["foo"].ToString());
}
}
}
The text was updated successfully, but these errors were encountered:
Using the example code, the message received (IMessage), which has a clientId parameter, is always null. Should this not be containing the client ID of the sender? Thus, it should never be null??
public class Listener : IMessageListener { //private BayeuxClient client; public void onMessage(IClientSessionChannel channel, IMessage message) { IDictionary ss = (IDictionary)message.DataAsDictionary; String foo = (String)ss["foo"]; String senderClientId = message.ClientId; // is always null if (senderClientId.Equals(Form1.clientId)) //should crash here { MessageBox.Show("I sent a message to myself"); } else { MessageBox.Show(ss["foo"].ToString()); } } }
The text was updated successfully, but these errors were encountered: