Exemple #1
0
        public void onMessage(string msg)
        {
            CybergameSocketMessage socketMessage = JsonConvert.DeserializeObject <CybergameSocketMessage>(msg);
            CybergameMessage       chatMessage   = new CybergameMessage
            {
                Name   = socketMessage.From,
                Text   = socketMessage.Text,
                ToName = socketMessage.Text.Contains(channelName) ? channelName : ""
            };

            messageReceived(this, chatMessage);
        }
Exemple #2
0
 public void onMessage(string msg){
     CybergameSocketMessage socketMessage = JsonConvert.DeserializeObject<CybergameSocketMessage>(msg);
     CybergameMessage chatMessage = new CybergameMessage
     {
         Name = socketMessage.From,
         Text = socketMessage.Text,
         ToName = socketMessage.Text.Contains(channelName) ? channelName : ""
     };
     messageReceived(this, chatMessage);
 }