Net::SIP::NATHelper::Server(3pm) | User Contributed Perl Documentation | Net::SIP::NATHelper::Server(3pm) |
Net::SIP::NATHelper::Server - server for Net::SIP::NATHelper::Client
This module is a wrapper around Net::SIP::NATHelper::Base and will receive it's instructions from Net::SIP::NATHelper::Client using RPC via sockets.
If HELPER is given and a Net::SIP::NATHelper::Base object or derived it will be used, otherwise the helper will be created.
Currently implemented commands are "allocate","activate" and "close" which will map to the local methods allocate_sockets, activate_session and close_session.
One might redefine or add commands by changing "$self->{commands}". The key of this hash reference is the command name and the value is the callback.
Unknown commands will be ignored, e.g nothing returned.
When file descriptors gets available for reading it will execute the callbacks, e.g. forward the RTP data or call do_command. In regular intervals it will call expire from Net::SIP::NATHelper::Base to expire the RTP sockets and sessions.
The local event loop should be pluggable, so that other implementations could be used. Right now it's a hard coded loop using select.
2023-02-04 | perl v5.36.0 |