Summary
Functions
Used by server implementations when a channel process exits (generally observed by a monitor). Sets the channel status as closed and prevents sending messages.
Sends a termination message to the open HTTP connection. When this function returns, the HTTP connection may not have terminated yet.
Returns a channel identifying the calling process.
Sends a log message notification to the client if the message level is at or above the channel's configured log level.
Sends a message event with the given data, a binary that will be sent as-is
to the client.
Types
@type log_level() ::
:debug | :info | :notice | :warning | :error | :critical | :alert | :emergency
@type status() :: :request | :stream | :closed
Functions
Used by server implementations when a channel process exits (generally observed by a monitor). Sets the channel status as closed and prevents sending messages.
Sends a termination message to the open HTTP connection. When this function returns, the HTTP connection may not have terminated yet.
Returns a channel identifying the calling process.
Sends a log message notification to the client if the message level is at or above the channel's configured log level.
Returns :ok if the message was sent or filtered out, {:error, :closed} if
the channel is closed.
Sends a message event with the given data, a binary that will be sent as-is
to the client.
To be a valid SSE event, the data must not contain any newlines.