protected virtual void OnDataException(UdpServerEventArgs arg) { NetStat.Set("Errors", 1, arg.Data?.Length ?? 0); DataException?.Invoke(this, arg); Helper.OnException(arg.Exception); }
protected internal void OnDataLoad(TcpServerEventArgs arg) { NetStat.Set("Server Receive", 1, arg.Length); if (logEvents) { Helper.Logs.Add(new StateInfo("NetService", "DataLoad", string.Format("{0} {1} {2}", arg.Client.Socket.LocalEndPoint, arg.Client.Socket.RemoteEndPoint, Helper.TextDisplayFormat(arg.Length, "size")))); } DataLoad?.Invoke(this, arg); arg.Stream.Dispose(); }
protected virtual void OnDataLoad(UdpServerEventArgs arg) { NetStat.Set("Data Receive", 1, arg.Length); DataLoad?.Invoke(this, arg); }
protected virtual void OnDataSend(UdpServerEventArgs arg) { DataSend?.Invoke(this, arg); NetStat.Set("Data Send", 1, arg.Length); }