diff options
author | Loïc Hoguin <[email protected]> | 2024-01-17 12:52:45 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-01-17 12:52:45 +0100 |
commit | 5fe1be70078d7970c9e3bb687294d438918d7925 (patch) | |
tree | 3f0219d2fe307aaf75401401c4978a79597b9da0 /doc/src/manual/cowboy_stream.terminate.asciidoc | |
parent | defce46fdf85d16bbe3c0a8de6058334e8a53775 (diff) | |
download | cowboy-5fe1be70078d7970c9e3bb687294d438918d7925.tar.gz cowboy-5fe1be70078d7970c9e3bb687294d438918d7925.tar.bz2 cowboy-5fe1be70078d7970c9e3bb687294d438918d7925.zip |
Add missing manual pages for cowboy_stream functions
Diffstat (limited to 'doc/src/manual/cowboy_stream.terminate.asciidoc')
-rw-r--r-- | doc/src/manual/cowboy_stream.terminate.asciidoc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/src/manual/cowboy_stream.terminate.asciidoc b/doc/src/manual/cowboy_stream.terminate.asciidoc new file mode 100644 index 0000000..8393801 --- /dev/null +++ b/doc/src/manual/cowboy_stream.terminate.asciidoc @@ -0,0 +1,61 @@ += cowboy_stream:terminate(3) + +== Name + +cowboy_stream:terminate - Terminate a stream + +== Description + +[source,erlang] +---- +terminate(StreamID, Reason, State) -> ok + +StreamID :: cowboy_stream:stream_id() +Reason :: cowboy_stream:reason() +State - opaque +---- + +Terminate a stream. + +This function must be called by all stream handlers. It will +terminate the next configured stream handler. + +== Arguments + +StreamID:: + +The stream ID. + +Reason:: + +Reason for termination. + +State:: + +The state for the next stream handler. + +== Return value + +The atom `ok` is always returned. It can be safely ignored. + +== Changelog + +* *2.0*: Function introduced. + +== Examples + +.Terminate the next stream handler +[source,erlang] +---- +terminate(StreamID, Reason, State=#state{next=Next0}) -> + my_termination(State), + cowboy_stream:terminate(StreamID, Reason, Next0). +---- + +== See also + +link:man:cowboy_stream(3)[cowboy_stream(3)], +link:man:cowboy_stream:init(3)[cowboy_stream:init(3)], +link:man:cowboy_stream:data(3)[cowboy_stream:data(3)], +link:man:cowboy_stream:info(3)[cowboy_stream:info(3)], +link:man:cowboy_stream:early_error(3)[cowboy_stream:early_error(3)] |