Ace.HTTP.Channel (ace v0.19.0) View Source

Reference to a single HTTP request/response exchange, within the context of a connection.

  • With HTTP/2 a channel corresponds to a single stream.
  • With HTTP/1.1 pipelining a single connection can support multiple channels.

The channel struct provides a normalised structure regardless of which version of the protocol is used. A channel struct also contains all information about the connection.

  • TODO consider calling this exchange instead of channel.
  • TODO add functions like cleartext? http_version? transport_version that pull information from socket.

Link to this section Summary

Functions

Send an acknowledgement that the Ace.HTTP.Worker has received a request part

Monitor the process managing the local endpoint of the connection containing a channel.

Send a list of message parts over a HTTP channel.

Link to this section Types

Specs

t() :: %Ace.HTTP.Channel{endpoint: pid(), id: integer(), socket: Ace.Socket.t()}

Link to this section Functions

Specs

ack(t()) :: :ok

Send an acknowledgement that the Ace.HTTP.Worker has received a request part

Link to this function

monitor_endpoint(channel)

View Source

Specs

monitor_endpoint(t()) :: reference()

Monitor the process managing the local endpoint of the connection containing a channel.

Specs

send(t(), [Raxx.part()]) :: {:ok, t()} | {:error, :connection_closed}

Send a list of message parts over a HTTP channel.