//------------------------------------------------------------------------------- //--- Send message ------------------------------------------------------------- public void SendSingleMessage(cMessageData msg) { try { isSending = true; ClientChannel.BeginSendSingleMessage(msg, new AsyncCallback(EndSendSingleMessage), null); } catch (Exception ex) { isSending = false; OnFault(); } }
private void createNewMessage(string text) { cMessageData msg = new cMessageData { msgDate = DateTime.Now, msgNum = staticMsgNum++, msgText = text }; msgArhive.Add(msg); if (IsLogEnabled) LOG.addMessageToLog(msg.msgToString()); if (IsSpamEnabled) foreach (MDSClient c in Clients.Values.ToArray()) { c.SendSingleMessage(msg); } }