Sippet v0.4.9 Sippet.Transports.Queue

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.

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

Types

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

Functions

incoming_datagram(datagram, from)
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.

validate_message(message, from)
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.