Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNSocketQueue.h

Go to the documentation of this file.
00001 /* Copyright (C) 2002 Steffen Fiksdal 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 00025 #ifndef MNSOCKET_QUEUE_H 00026 #define MNSOCKET_QUEUE_H 00027 00028 #include <stdio.h> 00029 #include <MNPCList.h> 00030 #include <sys/uio.h> 00031 #include "MNRTPbase.h" 00032 00044 class MNSocketQueue 00045 { 00046 private: 00047 static const u_int32_t FRONT = 1; 00048 static const u_int32_t BACK = 2; 00049 double queue_size; 00050 00051 protected: 00053 MNPCList<struct iovec*> _rtp_queue; 00054 00055 public: 00056 MNSocketQueue( ); 00057 00058 ~MNSocketQueue( ); 00059 00068 void send_bytes( MNRTPbase* caller, struct sockaddr_in* target); 00069 00078 void push_rtp_back( struct iovec* iov, int blocks ); 00079 00088 void push_rtp_front( struct iovec* iov, int blocks ); 00089 00103 void push_leftovers_rtp( struct iovec* iov, 00104 int blocks, 00105 int sent, 00106 int where = MNSocketQueue::BACK ); 00107 00108 bool isEmpty( ); 00109 00110 double getQueueSize(); 00111 }; 00112 00113 00114 00115 #endif /* MNSOCKET_QUEUE_H */

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8