public uint HandleEventSendComplete(ref MsQuicNativeMethods.StreamEvent evt) { _sendBuffer.Free(); foreach (var gchBufferArray in _bufferArrays) { gchBufferArray.Dispose(); } _resettableCompletion.Complete(evt.Data.PeerRecvAbort.ErrorCode); return(MsQuicConstants.Success); }
protected void HandleEventRecv(ref MsQuicNativeMethods.StreamEvent evt) {
private uint HandleEventSendShutdownComplete(ref MsQuicNativeMethods.StreamEvent evt) { return(MsQuicConstants.Success); }
internal uint HandleEvent(ref MsQuicNativeMethods.StreamEvent evt) { var status = MsQuicConstants.Success; switch (evt.Type) { case QUIC_STREAM_EVENT.START_COMPLETE: status = HandleStartComplete(); break; case QUIC_STREAM_EVENT.RECV: { HandleEventRecv( ref evt); } break; case QUIC_STREAM_EVENT.SEND_COMPLETE: { status = HandleEventSendComplete(ref evt); } break; case QUIC_STREAM_EVENT.PEER_SEND_CLOSE: { status = HandleEventPeerSendClose(); } break; // TODO figure out difference between SEND_ABORT and RECEIVE_ABORT case QUIC_STREAM_EVENT.PEER_SEND_ABORT: { _streamClosedTokenSource.Cancel(); status = HandleEventPeerSendAbort(); } break; case QUIC_STREAM_EVENT.PEER_RECV_ABORT: { _streamClosedTokenSource.Cancel(); status = HandleEventPeerRecvAbort(); } break; case QUIC_STREAM_EVENT.SEND_SHUTDOWN_COMPLETE: { status = HandleEventSendShutdownComplete(ref evt); } break; case QUIC_STREAM_EVENT.SHUTDOWN_COMPLETE: { Close(); return(MsQuicConstants.Success); } default: break; } return(status); }