From b350180503ea8ddb25d93169ac87e5e74baf1de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 7 Oct 2019 14:06:37 +0200 Subject: Add new stream handlers to the guide Also link from the guide to manual pages. --- doc/src/guide/streams.asciidoc | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'doc') 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. -- cgit v1.2.3