gun:flush(3)

Name

gun:flush - Flush all messages related to a connection or a stream

Description

flush(ConnPid) -> ok
flush(StreamRef) -> ok

ConnPid    :: pid()
StreamRef  :: gun:stream_ref()

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
gun:flush(ConnPid).
Flush messages from a single stream
gun:flush(StreamRef).

See also

gun(3), gun:await(3), gun:await_body(3), gun:await_up(3)

Gun 2.0 Function Reference

Navigation

Version select

Like my work? Donate!

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.