private void SendCommand(InterChatCommandType type, object value) { var msg = new InterChatCommandMsg { TypeCode = (int)type, Content = Convert.ToString(value) }; _session.Send(msg); }
internal void BroadcastCommandMsgWithNoLock(InterChatCommandType commandType, string content) { var msg = new InterChatCommandMsg { TypeCode = (int)commandType, Content = content }; foreach (var eachSession in _interChatUserMap.Keys) eachSession.Send(msg); }
private void SendCommand(InterChatCommandType type, object value) { var msg = new InterChatCommandMsg {TypeCode = (int) type, Content = Convert.ToString(value)}; _session.Send(msg); }
internal void BroadcastCommandMsgWithLock(InterChatCommandType commandType, string content) { _interChatLock.DoRead(() => BroadcastCommandMsgWithNoLock(commandType, content)); }