#include <receiver.h>
Public Member Functions | |
general worker methods | |
virtual void | Main () |
virtual void | Terminate () |
BOOL | ReadNetworkSocket () |
void | AddNewReceivedFrame (IAX2Frame *newFrame) |
Protected Attributes | |
IAX2EndPoint & | endpoint |
PUDPSocket & | sock |
IAX2FrameList | fromNetworkFrames |
BOOL | keepGoing |
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
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.
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