Sippet v0.5.1 Sippet.Transports.UDP.Plug
A Sippet.Transports.Plug
implementing a UDP transport.
The UDP transport consists basically in a listening process, this Plug
implementation itself, and a pool of senders, defined in
Sippet.Transports.UDP.Sender
, managed by poolboy
.
The start_link/0
function starts them, along a root supervisor that
monitors them all in case of failures.
This Plug
process creates an UDP socket and keeps listening for datagrams
in active mode. Its job is to forward the datagrams to the processing pool
defined in Sippet.Transports.Queue
. The sender processes pool keeps waiting
for SIP messages (as defined by Sippet.Message
), transforms them into
iodata and dispatch them to the same UDP socket created by this Plug
.
Both pools will block if all worker processes are busy, which may happen only in high load surges, as both are pure processing pools.
Summary
Functions
This blocking function gets called only during the senders’ initialization
This connection is not reliable
Send a message to the UDP senders’ pool
Starts the UDP plug