Sippet v0.6.2 Sippet.Transports.Queue View Source

The transport queue receives datagrams or messages from network transport protocols, validates and routes them to the transaction module.

The queue contains a worker pool to improve processing performance.

Link to this section Summary

Functions

Dispatches an incoming datagram to be parsed by one of the pool workers

Dispatches an incoming message to be validated by one of the pool workers

Link to this section Types

Link to this type

from() View Source
from() ::
  {protocol :: atom() | binary(), host :: :inet.ip_address() | binary(),
   dport :: :inet.port_number()}

Link to this section Functions

Link to this function

incoming_datagram(datagram, from) View Source
incoming_datagram(String.t(), from()) :: :ok

Dispatches an incoming datagram to be parsed by one of the pool workers.

The pool worker is responsible for moving the message up on the stack.

The datagram is a datagram packet just received from the transport that needs to get parsed and validated before handled by transactions or the core.

The from parameter is a tuple containing the protocol, the host name and the port of the socket that received the datagram.

Link to this function

validate_message(message, from) View Source
validate_message(message :: Sippet.Message.t(), from()) :: :ok

Dispatches an incoming message to be validated by one of the pool workers.

The pool worker is responsible for moving the message up on the stack.

The message is a Sippet.Message struct normally built from a stream socket, that still needs to be validated.

The from parameter is a tuple containing the protocol, the host name and the port of the socket that received the message.