Ankh.Transport protocol (ankh v0.15.0)
Transport interface
Link to this section Summary
Functions
Accepts a client connection
Closes the connection
Connects to an host
Handles transport messages
Returns the transport negotiated protocol if any, nil otherwise
Creates a new transport with the passed socket
Receives data
Sends data
Link to this section Types
Link to this type
data()
Specs
data() :: binary()
Transport data
Link to this type
msg()
Specs
msg() :: tuple()
Transport message
Link to this type
options()
Specs
options() :: keyword()
Transport options
Link to this type
size()
Specs
size() :: non_neg_integer()
Size
Link to this type
socket()
Specs
socket() :: any()
Socket
Specs
t() :: struct()
Transport socket
Link to this section Functions
Link to this function
accept(transport, options)
Specs
Accepts a client connection
Link to this function
close(transport)
Specs
Closes the connection
Link to this function
connect(transport, uri, timeout, options)
Specs
Connects to an host
Link to this function
handle_msg(transport, message)
Specs
Handles transport messages
Link to this function
negotiated_protocol(transport)
Specs
Returns the transport negotiated protocol if any, nil otherwise
Link to this function
new(transport, socket)
Specs
Creates a new transport with the passed socket
Link to this function
recv(transport, size, timeout)
Specs
Receives data
Link to this function
send(transport, data)
Specs
Sends data