45 std::map<resip::Data, unsigned long> mAllocationsPerUser;
46 std::map<asio::ip::address, unsigned long> mConnectionsPerIp;
47 std::set<asio::ip::address> mConnectionLimitLogged;
56 typedef std::map<unsigned short, PortState> PortAllocationMap;
57 PortAllocationMap mUdpAllocationPorts;
58 PortAllocationMap mTcpAllocationPorts;
59 unsigned short mLastAllocatedUdpPort;
60 unsigned short mLastAllocatedTcpPort;
64 asio::io_context& mIOService;
65 const ReTurnConfig& mConfig;
unsigned short allocateEvenPort(StunTuple::TransportType transport)
bool allocatePort(StunTuple::TransportType transport, unsigned short port, bool reserved=false)
unsigned short allocateEvenPortPair(StunTuple::TransportType transport)
void removeAllocation(const resip::Data &username)
unsigned short allocateAnyPort(StunTuple::TransportType transport)
void removeConnection(const asio::ip::address &address)
const ReTurnConfig & getConfig()
asio::io_context & getIOService()
void deallocatePort(StunTuple::TransportType transport, unsigned short port)
bool addConnection(const asio::ip::address &address)
TCP and TLS connections per client IP address (MaxTcpConnectionsPerIp): addConnection returns false,...
unsigned short allocateOddPort(StunTuple::TransportType transport)
void addAllocation(const resip::Data &username)
bool allocationQuotaReached(const resip::Data &username) const
Allocations per user, over all transports: TurnAllocation adds and removes its own (MaxAllocationsPer...
An alternative to std::string, encapsulates an arbitrary buffer of bytes.