diff options
author | Loïc Hoguin <[email protected]> | 2019-10-07 14:06:37 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-10-07 14:06:37 +0200 |
commit | b350180503ea8ddb25d93169ac87e5e74baf1de5 (patch) | |
tree | 806600dfde651bac802db508ea59d718913053b3 /doc/src | |
parent | 80aef3cdaa0b53c97526c40508b8198e9f96f19f (diff) | |
download | cowboy-b350180503ea8ddb25d93169ac87e5e74baf1de5.tar.gz cowboy-b350180503ea8ddb25d93169ac87e5e74baf1de5.tar.bz2 cowboy-b350180503ea8ddb25d93169ac87e5e74baf1de5.zip |
Add new stream handlers to the guide
Also link from the guide to manual pages.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/guide/streams.asciidoc | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/doc/src/guide/streams.asciidoc b/doc/src/guide/streams.asciidoc index 841a971..39b5203 100644 --- a/doc/src/guide/streams.asciidoc +++ b/doc/src/guide/streams.asciidoc @@ -17,7 +17,8 @@ in Cowboy. === Stream handlers -Stream handlers must implement five different callbacks. +link:man:cowboy_stream(3)[Stream handlers] +must implement five different callbacks. Four of them are directly related; one is special. All callbacks receives the stream ID as first argument. @@ -55,11 +56,20 @@ modified. Cowboy comes with two handlers. -`cowboy_stream_h` is the default stream handler. -It is the core of much of the functionality of Cowboy. -All chains of stream handlers should call it last. +link:man:cowboy_stream_h(3)[cowboy_stream_h] is the default +stream handler. It is the core of much of the functionality +of Cowboy. All chains of stream handlers should call it last. -`cowboy_compress_h` will automatically compress -responses when possible. It is not enabled by default. -It is a good example for writing your own handlers -that will modify responses. +link:man:cowboy_compress_h(3)[cowboy_compress_h] will +automatically compress responses when possible. It is not +enabled by default. It is a good example for writing your +own handlers that will modify responses. + +link:man:cowboy_metrics_h(3)[cowboy_metrics_h] gathers +metrics about a stream then passes them to a configurable +function. It is not enabled by default. + +link:man:cowboy_tracer_h(3)[cowboy_tracer_h] can be used to +conditionally trace streams based on the contents of the +request or its origin. Trace events are passed to a +configurable function. It is not enabled by default. |