Express v1.3.3 Express.Network.HTTP2.Client behaviour View Source

HTTP2-clients behaviour.

Link to this section Summary

Callbacks

Receives a response from socket by pid for a stream

Opens a socket for a provider with defined configuration and tries count

Sends a ping through a socket by pid

Sends a request through a socket by pid with headers and a payload

Returns URI of a connection

Link to this section Types

Link to this type t() View Source
t() :: Express.Network.HTTP2.Client

Link to this section Callbacks

Link to this callback get_response(pid, pid) View Source
get_response(pid, pid) :: {:ok, {String.t, String.t}} | any

Receives a response from socket by pid for a stream.

Link to this callback open_socket(atom, map, pos_integer) View Source
open_socket(atom, map, pos_integer) ::
  {:ok, pid} |
  {:error, :open_socket, :timeout} |
  {:error, :ssl_config, :certificate_missed} |
  {:error, :ssl_config, :rsa_key_missed}

Opens a socket for a provider with defined configuration and tries count.

Link to this callback ping(pid) View Source
ping(pid) :: :ok

Sends a ping through a socket by pid.

Link to this callback send_request(pid, list, arg2) View Source
send_request(pid, list, String.t) :: {:ok, pid} | any

Sends a request through a socket by pid with headers and a payload.

Link to this callback uri(atom, atom) View Source
uri(atom, atom) :: list

Returns URI of a connection