Sic.Framework-Nanjing-Baishi/MECF.Framework.Common/MECF/Framework/Common/Communications/Tcp/Socket/Client/APM/EventArgs/TcpServerDisconnectedEventA...

33 lines
710 B
C#
Raw Normal View History

2023-04-13 11:51:03 +08:00
using System;
using System.Net;
namespace MECF.Framework.Common.Communications.Tcp.Socket.Client.APM.EventArgs
{
public class TcpServerDisconnectedEventArgs : System.EventArgs
{
public IPEndPoint RemoteEndPoint { get; private set; }
public IPEndPoint LocalEndPoint { get; private set; }
public TcpServerDisconnectedEventArgs(IPEndPoint remoteEP)
: this(remoteEP, null)
{
}
public TcpServerDisconnectedEventArgs(IPEndPoint remoteEP, IPEndPoint localEP)
{
if (remoteEP == null)
{
throw new ArgumentNullException("remoteEP");
}
RemoteEndPoint = remoteEP;
LocalEndPoint = localEP;
}
public override string ToString()
{
return RemoteEndPoint.ToString();
}
}
}