private static Task FlushWriteImmediate(Task antecedant, object state) { antecedant.GetAwaiter().GetResult(); RTSocketConnection thisPtr = (RTSocketConnection)state; return(thisPtr._outputStream.FlushAsync(thisPtr._sendCts.Token)); }
private static void OnSendAsyncCompleted(Task antecedant, object state) { RTSocketConnection thisPtr = (RTSocketConnection)state; thisPtr.OnSendAsync(antecedant); }
private static async void FlushWriteImmediate(Task antecedant, object state) { await antecedant; RTSocketConnection thisPtr = (RTSocketConnection)state; await thisPtr._outputStream.FlushAsync(thisPtr._sendCts.Token); }