improve ipv6 error handling

This commit is contained in:
Luke Pulverenti
2016-12-07 15:02:34 -05:00
parent 20c2499797
commit 0130209cdc
6 changed files with 80 additions and 26 deletions

View File

@@ -4,6 +4,7 @@ namespace MediaBrowser.Model.Net
{
public interface ISocket : IDisposable
{
bool DualMode { get; }
IpEndPointInfo LocalEndPoint { get; }
IpEndPointInfo RemoteEndPoint { get; }
void Close();
@@ -13,4 +14,15 @@ namespace MediaBrowser.Model.Net
void StartAccept(Action<ISocket> onAccept, Func<bool> isClosed);
}
public class SocketCreateException : Exception
{
public SocketCreateException(string errorCode, Exception originalException)
: base(errorCode, originalException)
{
ErrorCode = errorCode;
}
public string ErrorCode { get; private set; }
}
}