IAX2Receiver Class Reference

#include <receiver.h>

List of all members.

Public Member Functions

general worker methods
virtual void Main ()
virtual void Terminate ()
BOOL ReadNetworkSocket ()
void AddNewReceivedFrame (IAX2Frame *newFrame)

Protected Attributes

IAX2EndPointendpoint
PUDPSocket & sock
IAX2FrameList fromNetworkFrames
BOOL keepGoing


Detailed Description

Manage the reception of etherenet packets on the specified port. All received packets are handed to the appropriate connection. A separate thread is used to wait on the ethernet port


Constructor & Destructor Documentation

IAX2Receiver::IAX2Receiver ( IAX2EndPoint _newEndpoint,
PUDPSocket &  _newSocket 
)

Construct a receiver, given references to the endpoint and socket

IAX2Receiver::~IAX2Receiver (  ) 

Destroy the receiver

IAX2Receiver::IAX2Receiver ( IAX2EndPoint _newEndpoint,
PUDPSocket &  _newSocket 
)

Construct a receiver, given references to the endpoint and socket

IAX2Receiver::~IAX2Receiver (  ) 

Destroy the receiver


Member Function Documentation

virtual void IAX2Receiver::Main (  )  [virtual]

virtual void IAX2Receiver::Terminate (  )  [virtual]

Close down this thread in a civilised fashion, by sending an empty packet to the PUDPSocket of this protocol. The Receiver will receive this packet, and check the close down flag, and so realise it is time to close down.

BOOL IAX2Receiver::ReadNetworkSocket (  ) 

Sit in here, waiting for data on the socket

void IAX2Receiver::AddNewReceivedFrame ( IAX2Frame newFrame  ) 

We have just read a frame from the network. This is a good IAX2Frame. Put it on the queue of frames to be processed by the IAX2EndPoint. The IAX2EndPoint will give this frame to the appropriate IAXConnection. Since this frame could be encrypted, and we do not have access to the keys (only the IAX2Connection has the keys, we cannot do anymore with the frame). Indeed, we are the receiving thread, and must put all our time into reading from the socket, not processing the packets.


Member Data Documentation

IAX2EndPoint& IAX2Receiver::endpoint [protected]

Global variable which holds the application specific data

PUDPSocket& IAX2Receiver::sock [protected]

Socket that is used to receive all network data from

IAX2FrameList IAX2Receiver::fromNetworkFrames [protected]

The act of processing a header will (inevitably) create additional frames as trunked frames are split up

BOOL IAX2Receiver::keepGoing [protected]

Flag to indicate if this receiver thread should keep listening for network data


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:34:03 2008 for OPAL by  doxygen 1.5.1