MNSocketQueue Class Reference
#include <MNSocketQueue.h>
Collaboration diagram for MNSocketQueue:
[legend]List of all members.
Detailed Description
MNSocketQueue
Streaming RTP over TCP requires storing, retrieving and sending of data that is not yet sent due to full socket buffers. When one chunk of RTP data is sent to the TCP socket, a part of the chunk can be left unsent due to full socket buffers. The MNSocketQueue stores pointers to iovec structures not yet sent, and store them in the right order. When the socket is writable again, the MNSocketQueue us notified and tries to send from the front of the queue.
Constructor & Destructor Documentation
MNSocketQueue::MNSocketQueue |
( |
|
) |
|
|
Member Function Documentation
double MNSocketQueue::getQueueSize |
( |
|
) |
|
|
bool MNSocketQueue::isEmpty |
( |
|
) |
|
|
void MNSocketQueue::push_leftovers_rtp |
( |
struct iovec * |
iov, |
|
|
int |
blocks, |
|
|
int |
sent, |
|
|
int |
where = MNSocketQueue::BACK |
|
) |
|
|
|
The method takes a number of iovecs (indicated by blocks), and how many bytes of the iovecs that was sent. It cleans out already sent data and adds remaining iovecs by calling push_rtp_back for each remaining iovec. - Parameters:
-
| iov | A pointer to the iovec structure(s) that was tried sent |
| blocks | Number of iovecs referred to from the pointer. |
| sent | Number of bytes sent of the structure(s) |
| where | The leftovers shall be stored first or last in the queue. |
|
void MNSocketQueue::push_rtp_back |
( |
struct iovec * |
iov, |
|
|
int |
blocks |
|
) |
|
|
|
The method adds a struct iovec pointer at the end of the queue - Parameters:
-
| iov | A pointer to the iovec structure to be stored. |
| blocks | The pointer can refer to an array of iovecs. Blocks indicates the size of the array. If it is not an array the parameter value equals 1. |
|
void MNSocketQueue::push_rtp_front |
( |
struct iovec * |
iov, |
|
|
int |
blocks |
|
) |
|
|
|
The method adds a struct iovec pointer at the front of the queue - Parameters:
-
| iov | A pointer to the iovec structure to be stored. |
| blocks | The pointer can refer to an array of iovecs. Blocks indicates the size of the array. If it is not an array the parameter value equals 1. |
|
void MNSocketQueue::send_bytes |
( |
MNRTPbase * |
caller, |
|
|
struct sockaddr_in * |
target |
|
) |
|
|
|
The method is triggered by the MNSelector when the socket is in the write set. This indicates that the socket can be fed with more data. The method is also called manually by MNRTP::rtp_send if necessary. - Parameters:
-
| caller | The object that called this method. |
| target | The socket destination target for sending data. |
|
Member Data Documentation
|
The list (queue) stores pointers to struct iovecs |
The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:02 2005 for Komssys by
1.3.8