public PayLoad OnMessage(GingerSocket.eProtocolMessageType MessageType, object obj = null) { MessageEventHandler handler = Message; if (handler != null) { MessageEventArgs EVArgs = new MessageEventArgs(MessageType, obj); handler(this, EVArgs); if (IsGingerSocketLogging) { GingerSocketLog GSL = new GingerSocketLog(); GSL.TimeStamp = DateTime.Now; GSL.Name = MessageType.ToString(); GSL.Info = obj.ToString(); GSL.LogType = "Message"; GingerSocketLogs.Add(GSL); } return(EVArgs.Response); } else { return(null); } }
public void OnMessage(GingerSocket.eProtocolMessageType MessageType, object obj = null) { MessageEventHandler handler = Message; if (handler != null) { handler(this, new MessageEventArgs(MessageType, obj)); } if (IsGingerSocketLogging) { GingerSocketLog GSL = new GingerSocketLog(); GSL.Name = MessageType.ToString(); GSL.Info = obj.ToString(); GSL.LogType = "Message"; GingerSocketLogs.Add(GSL); } }