1#if !defined(RESIP_TRANSPORTSELECTOR_HXX)
2#define RESIP_TRANSPORTSELECTOR_HXX
21class TestTransportSelector;
33class TransactionMessage;
35class TransactionController;
100 void addTransport(std::unique_ptr<Transport> transport,
bool isStackRunning);
149 for(TransportKeyMap::iterator i=mTransports.begin();
150 i!=mTransports.end();++i)
152 i->second->setCongestionManager(manager);
183 void checkTransportAddRemoveQueue();
185 Transport* findLoopbackTransportBySource(
bool ignorePort,
Tuple& src)
const;
189 void rebuildAnyPortTransportMaps(
void);
196 typedef std::map<Tuple, Transport*> ExactTupleMap;
197 ExactTupleMap mExactTransports;
200 typedef std::map<Tuple, Transport*, Tuple::AnyInterfaceCompare> AnyInterfaceTupleMap;
201 AnyInterfaceTupleMap mAnyInterfaceTransports;
204 typedef std::map<Tuple, Transport*, Tuple::AnyPortCompare> AnyPortTupleMap;
205 AnyPortTupleMap mAnyPortTransports;
208 typedef std::map<Tuple, Transport*, Tuple::AnyPortAnyInterfaceCompare> AnyPortAnyInterfaceTupleMap;
209 AnyPortAnyInterfaceTupleMap mAnyPortAnyInterfaceTransports;
211 typedef std::map<unsigned int, Transport*> TransportKeyMap;
212 TransportKeyMap mTransports;
214 typedef std::map<TlsTransportKey, Transport*> TlsTransportMap ;
215 TlsTransportMap mTlsTransports;
217 typedef std::list<Transport*> TransportList;
218 TransportList mSharedProcessTransports;
219 TransportList mHasOwnProcessTransports;
221 typedef std::multimap<Tuple, Transport*, Tuple::AnyPortAnyInterfaceCompare> TypeToTransportMap;
222 TypeToTransportMap mTypeToTransportMap;
225 mutable HashMap<Data, Socket> mSockets;
226 mutable HashMap<Data, Socket> mSocket6s;
234 osc::Stack *mSigcompStack;
241 std::unique_ptr<SelectInterruptor> mSelectInterruptor;
Abstract base class that provides a basic congestion management interface.
Connection implements, via sockets, ConnectionBase for managed connections.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool setUdpOnlyOnNumeric(bool value)
bool getUdpOnlyOnNumeric() const
Object-oriented wrapper for your platform's file-descriptor set.
A templated, threadsafe message-queue class.
Represents a SIP message.
This is the primary point of interaction between the app-layer and the stack.
TlsTransportKey(const TlsTransportKey &)=default
TlsTransportKey & operator=(TlsTransportKey &&)=default
~TlsTransportKey()=default
TlsTransportKey(TlsTransportKey &&)=default
bool operator<(const TlsTransportKey &rhs) const
TlsTransportKey & operator=(const TlsTransportKey &)=default
void registerMarkListener(MarkListener *listener)
unsigned int sumTransportFifoSizes() const
static Tuple getFirstInterface(bool is_v4, TransportType type)
Transport * findTransportBySource(Tuple &src, const SipMessage *msg) const
void closeConnection(const Tuple &peer)
bool setUdpOnlyOnNumeric(bool value)
void poke()
Causes transport process loops to be interrupted if there is stuff in their transmit fifos.
void createSelectInterruptor()
Called when the TransportSelector will be running in a different.
void buildFdSet(FdSet &fdset)
Builds an FdSet comprised of all FDs from all suitable Transports.
Transport * findTransportByDest(const Tuple &dest)
void setEnumSuffixes(const std::vector< Data > &suffixes)
bool isFinished() const
Returns true if all Transports have their buffers cleared, false otherwise.
unsigned int getTimeTillNextProcessMS()
bool getUdpOnlyOnNumeric() const
void removeTransport(unsigned int transportKey)
bool hasDataToSend() const
void addTransport(std::unique_ptr< Transport > transport, bool isStackRunning)
Add/Remove a transport.
DnsResult * createDnsResult(DnsHandler *handler)
DNS Resolution.
void setPollGrp(FdPollGrp *pollGrp)
Configure a PollGrp to use (instead of buildFdSet/process) Must be called before adding any transport...
TransmitState
transmit results in msg->resolve() being called to either kick off dns resolution or to pick the next...
void enableFlowTimer(const resip::Tuple &flow)
void shutdown()
Shuts down all transports.
void unregisterMarkListener(MarkListener *listener)
void terminateFlow(const resip::Tuple &flow)
Fifo< TransactionMessage > & stateMacFifo()
void setCongestionManager(CongestionManager *manager)
TransmitState transmit(SipMessage *msg, Tuple &target, SendData *sendData=0)
friend class TestTransportSelector
void invokeAfterSocketCreationFunc(TransportType type)
void dnsResolve(DnsResult *result, SipMessage *msg)
virtual ~TransportSelector()
void retransmit(const SendData &msg)
Resend to the same transport as last time.
The base class for Transport classes.
Represents a network address.
dcm! – add UnusedChecking(_enum) below;
struct FdPollItemFake * FdPollItemHandle
This is opaque type used to identify a particular Item.
TransportType
An enumeration of transport protocols.
EncodeStream & operator<<(EncodeStream &strm, const BaseException &e)
Represents an IP-address and port (V4 or V6).