OPAL
Version 3.14.3
|
#include <receiver.h>
Inherits PThread.
Public Member Functions | |
Constructors/destructors | |
IAX2Receiver (IAX2EndPoint &_newEndpoint, PUDPSocket &_newSocket) | |
~IAX2Receiver () | |
general worker methods | |
virtual void | Main () |
virtual void | Terminate () |
PBoolean | ReadNetworkSocket () |
void | AddNewReceivedFrame (IAX2Frame *newFrame) |
PINDEX | GetSize () |
Protected Attributes | |
IAX2EndPoint & | endpoint |
PUDPSocket & | sock |
IAX2FrameList | fromNetworkFrames |
PBoolean | keepGoing |
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
IAX2Receiver::IAX2Receiver | ( | IAX2EndPoint & | _newEndpoint, |
PUDPSocket & | _newSocket | ||
) |
Construct a receiver, given references to the endpoint and socket
IAX2Receiver::~IAX2Receiver | ( | ) |
Destroy the receiver
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.
|
inline |
Report how many frames are in the receive queue, waiting for extraction
References fromNetworkFrames.
|
virtual |
PBoolean IAX2Receiver::ReadNetworkSocket | ( | ) |
Sit in here, waiting for data on the socket
|
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.
|
protected |
Global variable which holds the application specific data
|
protected |
The act of processing a header will (inevitably) create additional frames as trunked frames are split up
Referenced by GetSize().
|
protected |
Flag to indicate if this receiver thread should keep listening for network data
|
protected |
Socket that is used to receive all network data from