mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
update socket interfaces
This commit is contained in:
28
MediaBrowser.Model/Net/IAcceptSocket.cs
Normal file
28
MediaBrowser.Model/Net/IAcceptSocket.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Net
|
||||
{
|
||||
public interface IAcceptSocket : IDisposable
|
||||
{
|
||||
bool DualMode { get; }
|
||||
IpEndPointInfo LocalEndPoint { get; }
|
||||
IpEndPointInfo RemoteEndPoint { get; }
|
||||
void Close();
|
||||
void Shutdown(bool both);
|
||||
void Listen(int backlog);
|
||||
void Bind(IpEndPointInfo endpoint);
|
||||
|
||||
void StartAccept(Action<IAcceptSocket> 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user