# IAX2Transmit Class Reference

`#include <transmit.h>`

Collaboration diagram for IAX2Transmit:

[legend]

## Public Member Functions

Construction/destruction
| IAX2Transmit (IAX2EndPoint &_newEndpoint, PUDPSocket &_newSocket)
| ~IAX2Transmit ()
Worker methods
virtual void | Terminate ()
void | SendFrame (IAX2Frame *newFrame)
void | ProcessLists ()
void | AckReceived ()
virtual void | Main ()
void | PurgeMatchingFullFrames (IAX2Frame *frame)
void | SendVnakRequestedFrames (IAX2FullFrameProtocol &src)
void | ReportLists (PString &answer, bool getFullReport=false)

## Protected Member Functions

void | ProcessAckingList ()
void | ProcessSendList ()

## Protected Attributes

IAX2EndPoint & | ep
PUDPSocket & | sock
PSyncPoint | activate
IAX2ActiveFrameList | ackingFrames
IAX2ActiveFrameList | sendNowFrames
PBoolean | keepGoing

## Detailed Description

Manage the transmission of ethernet packets on the specified port. All transmitted packets are received from any of the current connections. A separate thread is used to wait on the request to send packets. Full frame packets, which have been resent the requisite number of times are deleted. This class will (eventually) delete all the frames it is given.

Note that this class is a thread, and runs when activated by outside events.

## Constructor & Destructor Documentation

IAX2Transmit::IAX2Transmit | ( | IAX2EndPoint & | _newEndpoint,
|  | PUDPSocket & | _newSocket |
| ) |  |  |

Constructor, which creates a thread to send all packets on the designated socket.

IAX2Transmit::~IAX2Transmit | ( |  | ) |

Destructor. Deletes all pending packets.

## Member Function Documentation

void IAX2Transmit::AckReceived | ( |  | ) |

An Ack has been received.. Delete the matching frame from the queue waiting for an ack

virtual void IAX2Transmit::Main | ( |  | ) | `[virtual]`

Do the work of the thread here. Read all lists and check for frames to send/delete.

void IAX2Transmit::ProcessAckingList | ( |  | ) | `[protected]`

Go through the acking list:: delete those who have too many retries, and transmit those who need retransmitting

void IAX2Transmit::ProcessLists | ( |  | ) | `[inline]`

Activate the transmit thread to process all frames in the lists

void IAX2Transmit::ProcessSendList | ( |  | ) | `[protected]`

Go through the send list:: send all frames on this list

void IAX2Transmit::PurgeMatchingFullFrames | ( | IAX2Frame * | frame | ) |

A full frame was transmitted a while ago, and the receiver has replied with a suitable acknowledgement. The acknowledgment (the newFrame) means that matching frames in the ack list should be removed.

void IAX2Transmit::ReportLists | ( | PString & | answer,
|  | bool | getFullReport = `false` |
| ) |  |  |

Report on the contents of the lists waiting for transmission

void IAX2Transmit::SendFrame | ( | IAX2Frame * | newFrame | ) |

Queue a frame for delivery. This is called by a connection, and then the transmit thread is woken up.

void IAX2Transmit::SendVnakRequestedFrames | ( | IAX2FullFrameProtocol & | src | ) |

A Vnak frame has been received (voice not acknowledged) which actually means, retransmit all those frames you have on this particular call number from the oseqno specified in the supplied frame

virtual void IAX2Transmit::Terminate | ( |  | ) | `[virtual]`

Cause this thread to end now

## Field Documentation

IAX2ActiveFrameList IAX2Transmit::ackingFrames `[protected]`

Frames in the acking list - These frames are waiting on an ack. Full frames in this list will be resent an additional 3 times if not replied to. There are no mini frames in this list - mini frames are not acked.

PSyncPoint IAX2Transmit::activate `[protected]`

Flag to activate this thread

IAX2EndPoint& IAX2Transmit::ep `[protected]`

Global variable specifying application specific variables

PBoolean IAX2Transmit::keepGoing `[protected]`

Flag to indicate that this thread should keep working

IAX2ActiveFrameList IAX2Transmit::sendNowFrames `[protected]`

Send Now list of frames - These frames are to be sent now

PUDPSocket& IAX2Transmit::sock `[protected]`

Network socket used to transmit packets

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

- transmit.h