ankh v0.8.1 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
Protocol options
Request reference
Ankh protocol
Link to this section Callbacks
Link to this callback
accept(t, arg2, arg3, arg4)
accept(t(), URI.t(), Ankh.Transport.t(), Ankh.Transport.options()) :: {:ok, t()} | {:error, any()}
Accepts a client connection
Closes the connection
Link to this callback
connect(t, arg2, arg3)
connect(t(), URI.t(), Ankh.Transport.options()) :: {:ok, t()} | {:error, any()}
Connects to an host
Reports a connection error
Creates a new connection
Link to this callback
request(t, arg2)
request(t(), Ankh.HTTP.Request.t()) :: {:ok, t(), request_ref()} | {:error, any()}
Sends a request
Link to this callback
respond(t, request_ref, arg3)
respond(t(), request_ref(), Ankh.HTTP.Response.t()) :: {:ok, t()} | {:error, any()}
Sends a response
Handles transport messages