private UvPipeHandle ListenPipe(bool useFileHandle) { var pipe = new UvPipeHandle(Log); try { pipe.Init(Thread.Loop, Thread.QueueCloseHandle, false); if (!useFileHandle) { // UnixDomainSocketEndPoint.ToString() returns the path pipe.Bind(EndPoint.ToString()); } else { pipe.Open((IntPtr)((FileHandleEndPoint)EndPoint).FileHandle); } } catch { pipe.Dispose(); throw; } return(pipe); }
private UvPipeHandle ListenPipe(bool useFileHandle) { var pipe = new UvPipeHandle(Log); try { pipe.Init(Thread.Loop, Thread.QueueCloseHandle, false); if (!useFileHandle) { pipe.Bind(EndPointInformation.SocketPath); } else { pipe.Open((IntPtr)EndPointInformation.FileHandle); } } catch { pipe.Dispose(); throw; } return(pipe); }