1#if !defined(RESIP_UDPTRANSPORT_HXX)
2#define RESIP_UDPTRANSPORT_HXX
12namespace osc {
class Stack; }
65 const Data& interfaceObj,
68 unsigned transportFlags = 0);
152 std::array<char, MaxMessageSize> mRxUncompressedBuffer{};
154 MsgHeaderScanner mMsgHeaderScanner;
156 Tuple mStunMappedAddress;
164 std::array<unsigned char, 16> mStunTxId;
165 Tuple mStunServerTuple;
167 ExternalUnknownDatagramHandler* mExternalUnknownDatagramHandler;
static Compression Disabled
Represents a compression configuration object with compression disabled.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Interface functor for external unrecognized datagram handling.
virtual void operator()(UdpTransport *transport, const Tuple &source, std::unique_ptr< Data > unknownDatagram)=0
virtual ~ExternalUnknownDatagramHandler()
Object-oriented wrapper for your platform's file-descriptor set.
A templated, threadsafe message-queue class.
Represents a network address.
A Transport based on UDP.
virtual bool isDatagram() const
void setExternalUnknownDatagramHandler(ExternalUnknownDatagramHandler *handler)
Installs a handler for the unknown datagrams arriving on the udp transport.
virtual bool isReliable() const
virtual void setRcvBufLen(int buflen)
void processRxParse(int len, const Tuple &sender)
Parse the contents of {mRxBuffer} and do something with it.
bool stunSendTest(const Tuple &dest)
Send a STUN Binding Request to dest for public-address discovery.
osc::Stack * mSigcompStack
int processRxRecv(Tuple &sender)
void processTxAll()
Added support for TXNOW and TXALL.
virtual void setPollGrp(FdPollGrp *grp)
static constexpr int MaxMessageSize
virtual void buildFdSet(FdSet &fdset)
Adds the Transport's socket FD to the appropriate read or write sets as applicable.
std::array< char, MaxMessageSize > mRxBuffer
RESIP_HeapCount(UdpTransport)
void processRxParseSip(char *buffer, int len, const Tuple &sender)
@ StunResultResponseParseFailed
void processTxOne(SendData *data)
void processRxAll()
Add options RXALL (to try receive all readable data).
virtual void processPollEvent(FdPollEventMask mask)
Called by PollGrp when activity is possible.
StunResult stunResult(Tuple &mappedAddress)
Return the result of the most recent stunSendTest(); on StunResultSuccess, mappedAddress is filled wi...
virtual bool hasDataToSend() const
If we return true, the TransactionController will set the timeout to zero so that process() is called...
unsigned mRxTransactionCnt
virtual void process()
Called after a message is added.
dcm! – add UnusedChecking(_enum) below;
void(* AfterSocketCreationFuncPtr)(Socket s, int transportType, const char *file, int line)
unsigned short FdPollEventMask
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.
IpVersion
An enumeration of IP versions.