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