aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/gun.flush.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-02 22:44:16 +0200
committerLoïc Hoguin <[email protected]>2018-06-02 22:44:16 +0200
commit5b810c924da242632a04a2c44772cb892aa1b7c0 (patch)
treee9ee81bd3b6aea1f9665914b8858edad377c24c7 /doc/src/manual/gun.flush.asciidoc
parent04b41c3cf70aba88c1dd76e4e86c39458d817219 (diff)
downloadgun-5b810c924da242632a04a2c44772cb892aa1b7c0.tar.gz
gun-5b810c924da242632a04a2c44772cb892aa1b7c0.tar.bz2
gun-5b810c924da242632a04a2c44772cb892aa1b7c0.zip
Revamp the manual, one page per function/message
Diffstat (limited to 'doc/src/manual/gun.flush.asciidoc')
-rw-r--r--doc/src/manual/gun.flush.asciidoc59
1 files changed, 59 insertions, 0 deletions
diff --git a/doc/src/manual/gun.flush.asciidoc b/doc/src/manual/gun.flush.asciidoc
new file mode 100644
index 0000000..b6424a9
--- /dev/null
+++ b/doc/src/manual/gun.flush.asciidoc
@@ -0,0 +1,59 @@
+= gun:flush(3)
+
+== Name
+
+gun:flush - Flush all messages related to a connection or a stream
+
+== Description
+
+[source,erlang]
+----
+flush(ConnPid) -> ok
+flush(StreamRef) -> ok
+
+ConnPid :: pid()
+StreamRef :: reference()
+----
+
+Flush all messages related to a connection or a stream.
+
+== Arguments
+
+Either of these arguments may be provided:
+
+ConnPid::
+
+The pid of the Gun connection process.
+
+StreamRef::
+
+Identifier of the stream for the original request.
+
+== Return value
+
+The atom `ok` is returned.
+
+== Changelog
+
+* *1.0*: Function introduced.
+
+== Examples
+
+.Flush all messages from a connection
+[source,erlang]
+----
+gun:flush(ConnPid).
+----
+
+.Flush messages from a single stream
+[source,erlang]
+----
+gun:flush(StreamRef).
+----
+
+== See also
+
+link:man:gun(3)[gun(3)],
+link:man:gun:await(3)[gun:await(3)],
+link:man:gun:await_body(3)[gun:await_body(3)],
+link:man:gun:await_up(3)[gun:await_up(3)]