init commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
|
||||
namespace StandardScene.TCP
|
||||
{
|
||||
/// <summary>
|
||||
/// 与服务器的连接发生异常事件
|
||||
/// </summary>
|
||||
public class TcpServerExceptionOccurredEventArgs : EventArgs
|
||||
{
|
||||
public TcpServerExceptionOccurredEventArgs(IPAddress ipAddresses, int port, Exception innerException)
|
||||
{
|
||||
if (ipAddresses == null)
|
||||
{
|
||||
throw new ArgumentNullException("ipAddress");
|
||||
}
|
||||
this.Address = ipAddresses;
|
||||
this.Port = port;
|
||||
this.Exception = innerException;
|
||||
}
|
||||
|
||||
public IPAddress Address { get; private set; }
|
||||
|
||||
public int Port { get; private set; }
|
||||
|
||||
public Exception Exception { get; private set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.Address + ":" + this.Port.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user