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); } }
public static extern void uv_pipe_connect(UvPipeConnectRequest req, UvPipe handle, string name, UvConnectCallback cb);