ankh v0.8.11 Ankh.Protocol behaviour
Protocol behavior
Link to this section Summary
Callbacks
Accepts a client connection
Closes the connection
Connects to an host
Reports a connection error
Creates a new connection
Sends a request
Sends a response
Handles transport messages
Link to this section Types
Link to this type
options()
Specs
options() :: Keyword.t()
Protocol options
Link to this type
request_ref()
Specs
request_ref() :: reference()
Request reference
Specs
t() :: any()
Ankh protocol
Link to this section Callbacks
Link to this callback
accept(t, arg2, arg3, arg4)
Specs
accept(t(), URI.t(), Ankh.Transport.t(), Ankh.Transport.options()) :: {:ok, t()} | {:error, any()}
Accepts a client connection
Link to this callback
close(t)
Specs
Closes the connection
Link to this callback
connect(t, arg2, arg3)
Specs
connect(t(), URI.t(), Ankh.Transport.options()) :: {:ok, t()} | {:error, any()}
Connects to an host
Link to this callback
error(t)
Specs
Reports a connection error
Link to this callback
new(options)
Specs
Creates a new connection
Link to this callback
request(t, arg2)
Specs
request(t(), Ankh.HTTP.Request.t()) :: {:ok, t(), request_ref()} | {:error, any()}
Sends a request
Link to this callback
respond(t, request_ref, arg3)
Specs
respond(t(), request_ref(), Ankh.HTTP.Response.t()) :: {:ok, t()} | {:error, any()}
Sends a response
Link to this callback
stream(t, any)
Specs
Handles transport messages