Co-authored-by: Matt Olson <maolson@microsoft.com>
This commit is contained in:
Nick Banks 2021-05-21 12:30:35 -07:00 коммит произвёл GitHub
Родитель 875af77e8f
Коммит 45344cf3c2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -17,11 +17,17 @@ void
# Parameters
**TODO**
`Stream`
A Stream handle from a previous call to [StreamClose](StreamClose.md).
# Remarks
**TODO**
The application should only close a stream after it has been completely shut down or it was never successfully started. Closing a stream before it has been completely shut down produces **undefined behavior** because clean up of the stream **must** be reflected on the wire with an application specific error code. When the app closes a stream without first shutting down, MsQuic has to guess which error code to use (currently uses `0`) when sending the state change to the peer.
If the application needs to quickly discard all stream state and doesn't care about the result, it should first call [StreamShutdown](StreamShutdown.md) with the `QUIC_STREAM_SHUTDOWN_FLAG_ABORT` and `QUIC_STREAM_SHUTDOWN_FLAG_IMMEDIATE` flags, specifying an appropriate error code. Then, only after the `QUIC_STREAM_EVENT_SHUTDOWN_COMPLETE` should the app call close. This event will happen immediately.
`StreamClose` may be called on any callback, including one for the stream being closed.
# See Also