コード例 #1
0
        protected virtual void OnDataException(UdpServerEventArgs arg)
        {
            NetStat.Set("Errors", 1, arg.Data?.Length ?? 0);
            DataException?.Invoke(this, arg);

            Helper.OnException(arg.Exception);
        }
コード例 #2
0
ファイル: TcpServer.cs プロジェクト: radtek/datawf
        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();
        }
コード例 #3
0
 protected virtual void OnDataLoad(UdpServerEventArgs arg)
 {
     NetStat.Set("Data Receive", 1, arg.Length);
     DataLoad?.Invoke(this, arg);
 }
コード例 #4
0
ファイル: UdpServer.cs プロジェクト: radtek/datawf
 protected virtual void OnDataSend(UdpServerEventArgs arg)
 {
     DataSend?.Invoke(this, arg);
     NetStat.Set("Data Send", 1, arg.Length);
 }