public PipeListener(Loop loop, bool ipc) : base(loop, ipc) { _onReadAction = (p, s) => OnRead(p, s); _pipes = new List <Pipe>(); _windowsApi = new WindowsApi(); _requestId = 0; }
internal static bool GetReuseAddress(TcpHandle tcpHandle) { IntPtr socketHandle = GetSocketHandle(tcpHandle); return(IsWindows ? WindowsApi.GetReuseAddress(socketHandle) : UnixApi.GetReuseAddress(socketHandle)); }
internal static bool GetReuseAddress(TcpHandle tcpHandle) { IntPtr socketHandle = GetSocketHandle(tcpHandle); return(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? WindowsApi.GetReuseAddress(socketHandle) : UnixApi.GetReuseAddress(socketHandle)); }
internal static void SetReuseAddress(TcpHandle tcpHandle, int value) { IntPtr socketHandle = GetSocketHandle(tcpHandle); if (IsWindows) { WindowsApi.SetReuseAddress(socketHandle, value); } else { UnixApi.SetReuseAddress(socketHandle, value); } }
internal static void SetReuseAddress(TcpHandle tcpHandle, int value) { IntPtr socketHandle = GetSocketHandle(tcpHandle); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { WindowsApi.SetReuseAddress(socketHandle, value); } else { UnixApi.SetReuseAddress(socketHandle, value); } }
public PipeListener(Loop loop, bool ipc) : base(loop, ipc) { this.pipes = new List <Pipe>(); this.windowsApi = new WindowsApi(); this.requestId = 0; }