Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }