Example #1
0
 /// <summary>
 /// This function is called from the client script
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="toUserID"></param>
 /// <returns></returns>
 public string SendMessage(string msg, string toUserID)
 {
     try
     {
         ChatRoom room = ChatEngine.GetRoom(Session["UserName"].ToString(), toUserID);
         string   res  = "";
         if (room != null)
         {
             res = room.SendMessage(msg, Session["UserName"].ToString(), toUserID);
         }
         return(res);
     }
     catch (Exception ex)
     {
     }
     return("");
 }