aboutsummaryrefslogtreecommitdiffstats
path: root/guide/http.md
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-08-26 18:55:41 +0200
committerLoïc Hoguin <[email protected]>2013-08-26 18:56:54 +0200
commit5388696cf95d6c9b4400952bfcf3fb9db215c63c (patch)
treeeb5c52c44e250e1b2699167e11d297f598e310d5 /guide/http.md
parent0c5a2c3a9097207da803da7ee45cdad2d387a5a4 (diff)
downloadgun-5388696cf95d6c9b4400952bfcf3fb9db215c63c.tar.gz
gun-5388696cf95d6c9b4400952bfcf3fb9db215c63c.tar.bz2
gun-5388696cf95d6c9b4400952bfcf3fb9db215c63c.zip
Fix server pushed streams
Diffstat (limited to 'guide/http.md')
-rw-r--r--guide/http.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/guide/http.md b/guide/http.md
index 98a042e..e6b5f64 100644
--- a/guide/http.md
+++ b/guide/http.md
@@ -206,3 +206,16 @@ one for the request this stream is associated with.
Pushed streams typically feature a body. Replying to a pushed
stream is forbidden and Gun will send an error message if
attempted.
+
+Pushed streams can be received like this:
+
+``` erlang
+receive
+ {gun_push, Pid, PushedStreamRef, StreamRef,
+ Method, Host, Path, Headers} ->
+ %% ...
+end
+```
+
+The pushed stream gets a new identifier but you still receive
+the `StreamRef` this stream is associated to.