reSIProcate/stack  9694
Public Member Functions
FakeTransport Class Reference
Inheritance diagram for FakeTransport:
Inheritance graph
[legend]
Collaboration diagram for FakeTransport:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FakeTransport (Fifo< TransactionMessage > &rxFifo, int portNum, IpVersion version, const Data &interfaceObj, const Data &tlsDomain=Data::Empty)
virtual TransportType transport () const
virtual bool isFinished () const
virtual void process (FdSet &fdset)
 If there is work to do, this is the method that does it.
virtual void process ()
 Version of process to be invoked periodically when using callback-based IO (via FdPollGrp).
virtual void processTransmitQueue ()
virtual void buildFdSet (FdSet &fdset)
 Adds the Transport's socket FD to the appropriate read or write sets as applicable.
virtual bool isReliable () const
virtual bool isDatagram () const
virtual bool shareStackProcessAndSelect () const
 Returns true if this Transport should be included in the FdSet processing loop, false if the Transport will provide its own cycles.
virtual void startOwnProcessing ()
 transports that returned false to shareStackProcessAndSelect() shouldn't put messages into the fifo until this is called
virtual bool hasDataToSend () const
 only applies to transports that shareStackProcessAndSelect
virtual void setPollGrp (FdPollGrp *grp)
virtual unsigned int getFifoSize () const
virtual void send (std::auto_ptr< SendData > data)
void flush ()

Detailed Description

Definition at line 28 of file testConnectionBase.cxx.


Constructor & Destructor Documentation

FakeTransport::FakeTransport ( Fifo< TransactionMessage > &  rxFifo,
int  portNum,
IpVersion  version,
const Data interfaceObj,
const Data tlsDomain = Data::Empty 
) [inline]

Definition at line 31 of file testConnectionBase.cxx.

                                                       :
         Transport(rxFifo, portNum, version, interfaceObj, tlsDomain)
      {}

Member Function Documentation

virtual void FakeTransport::buildFdSet ( FdSet fdset) [inline, virtual]

Adds the Transport's socket FD to the appropriate read or write sets as applicable.

Implements resip::Transport.

Definition at line 44 of file testConnectionBase.cxx.

{ assert(0); }
void FakeTransport::flush ( ) [inline]

Definition at line 55 of file testConnectionBase.cxx.

Referenced by main().

virtual unsigned int FakeTransport::getFifoSize ( ) const [inline, virtual]

Implements resip::Transport.

Definition at line 52 of file testConnectionBase.cxx.

{ assert(0); return 0; }
virtual bool FakeTransport::hasDataToSend ( ) const [inline, virtual]

only applies to transports that shareStackProcessAndSelect

Implements resip::Transport.

Definition at line 50 of file testConnectionBase.cxx.

{ assert(0); return false; }
virtual bool FakeTransport::isDatagram ( ) const [inline, virtual]

Implements resip::Transport.

Definition at line 47 of file testConnectionBase.cxx.

{ assert(0); return true; }
virtual bool FakeTransport::isFinished ( ) const [inline, virtual]
Note:
Subclasses override this method by checking whether there are unprocessed messages on the TransactionMessage Fifo (that was passed in to the constructor).

Implements resip::Transport.

Definition at line 40 of file testConnectionBase.cxx.

{ assert(0); return true; }
virtual bool FakeTransport::isReliable ( ) const [inline, virtual]

Implements resip::Transport.

Definition at line 46 of file testConnectionBase.cxx.

{ assert(0); return true; }
virtual void FakeTransport::process ( FdSet fdset) [inline, virtual]

If there is work to do, this is the method that does it.

If the socket is readable, it is read. If the socket is writable and there are outgoing messages to be sent, they are sent.

Incoming messages are parsed and dispatched to the relevant entity. SIP messages will be posted to the TransactionMessage Fifo.

See also:
sendData()
Parameters:
fdsetis the FdSet after select() has been called.
See also:
FdSet::select()

Implements resip::Transport.

Definition at line 41 of file testConnectionBase.cxx.

{ assert(0); }
virtual void FakeTransport::process ( ) [inline, virtual]

Version of process to be invoked periodically when using callback-based IO (via FdPollGrp).

Implements resip::Transport.

Definition at line 42 of file testConnectionBase.cxx.

{ assert(0); }
virtual void FakeTransport::processTransmitQueue ( ) [inline, virtual]

Definition at line 43 of file testConnectionBase.cxx.

{ assert(0); }
virtual void FakeTransport::send ( std::auto_ptr< SendData data) [inline, virtual]
Todo:
!bwc! What we do with a SendData is flexible.

It might make a copy, or send synchronously, or convert to another type, etc.

Todo:
!bch! Should this be protected and not public? !bwc! TransportSelector uses this directly for retransmissions.

Implements resip::Transport.

Definition at line 54 of file testConnectionBase.cxx.

{ assert(0); }
virtual void FakeTransport::setPollGrp ( FdPollGrp grp) [inline, virtual]

Implements resip::Transport.

Definition at line 51 of file testConnectionBase.cxx.

{ assert(0); }
virtual bool FakeTransport::shareStackProcessAndSelect ( ) const [inline, virtual]

Returns true if this Transport should be included in the FdSet processing loop, false if the Transport will provide its own cycles.

If the Transport is going to provide its own cycles, the startOwnProcessing() and shutdown() will be called to tell the Transport when to process.

Return values:
truewill run in the SipStack's processing context
falseprovides own cycles, just puts messages in rxFifo

Implements resip::Transport.

Definition at line 48 of file testConnectionBase.cxx.

{ assert(0); return true;}
virtual void FakeTransport::startOwnProcessing ( ) [inline, virtual]

transports that returned false to shareStackProcessAndSelect() shouldn't put messages into the fifo until this is called

Todo:
?dcm? avoid the received a message but haven't added a transport to the TransportSelector race, but this might not be necessary.

Implements resip::Transport.

Definition at line 49 of file testConnectionBase.cxx.

{ assert(0); }
virtual TransportType FakeTransport::transport ( ) const [inline, virtual]
Returns:
This transport's TransportType.

Implements resip::Transport.

Definition at line 39 of file testConnectionBase.cxx.

References resip::TCP.

{ return TCP; }

The documentation for this class was generated from the following file: