/// <summary> /// 管道连接 /// </summary> /// <param name="uvStreamHandle"></param> /// <param name="num"></param> /// <param name="ex"></param> /// <param name="obj"></param> private unsafe void PipeConnectionCallBack(UvStreamHandle uvStreamHandle, int num, Exception ex, object obj) { if (num < 0) { return; } UvPipeHandle uvPipeHandle = new UvPipeHandle(); uvPipeHandle.Init(_loopHandle, true); try { uvStreamHandle.Accept(uvPipeHandle); } catch (Exception) { uvPipeHandle.Dispose(); return; } if (_uvPipeHandleOffset > 0) // 是windows系统 { *(int *)((void *)(uvPipeHandle.InternalGetHandle() + _uvPipeHandleOffset)) = _currentProcessId; } _pipeHandleList.Add(uvPipeHandle); }