private void PipeConnectCallback(UvPipeConnectRequest request, Exception error, object stateObject)
        {
            var state = (ListenState)stateObject;

            try
            {
                if (error != null)
                {
                    throw error;
                }

                request.BaseHandle.ReadStart(this.AllocCallback, this.ReadCallback, stateObject);
                state.StartTcs?.TrySetResult(null);
            }
            catch (Exception exception)
            {
                lock (this.SyncRoot)
                {
                    this.CloseBaseSocket();
                }

                this.OnConnectionAcceptError(exception);
                state.StartTcs?.TrySetException(exception);
            }
        }
예제 #2
0
파일: Libuv.cs 프로젝트: codecopy/NLibuv
 public static extern void uv_pipe_connect(UvPipeConnectRequest req, UvPipe handle, string name, UvConnectCallback cb);