mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 20:42:29 -04:00
moved QoS down to pqistreamer pipes. This removes one out queue, and removes lags due to many packets being sent at ones.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5249 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fd34bbfdaf
commit
8d070bb030
10 changed files with 242 additions and 127 deletions
51
libretroshare/src/pqi/pqiqosstreamer.h
Normal file
51
libretroshare/src/pqi/pqiqosstreamer.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* libretroshare/src/pqi pqistreamer.h
|
||||
*
|
||||
* 3P/PQI network interface for RetroShare.
|
||||
*
|
||||
* Copyright 2012-2012 by Cyril Soler
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pqiqos.h"
|
||||
#include "pqistreamer.h"
|
||||
|
||||
class pqiQoSstreamer: public pqistreamer, public pqiQoS
|
||||
{
|
||||
public:
|
||||
pqiQoSstreamer(RsSerialiser *rss, std::string peerid, BinInterface *bio_in, int bio_flagsin);
|
||||
|
||||
static const uint32_t PQI_QOS_STREAMER_MAX_LEVELS = 10 ;
|
||||
static const float PQI_QOS_STREAMER_ALPHA = 2.0 ;
|
||||
|
||||
virtual void locked_storeInOutputQueue(void *ptr,int priority) ;
|
||||
virtual int out_queue_size() const { return _total_item_count ; }
|
||||
virtual void locked_clear_out_queue() ;
|
||||
virtual int locked_compute_out_pkt_size() const { return _total_item_size ; }
|
||||
virtual void *locked_pop_out_data() ;
|
||||
|
||||
virtual int getQueueSize(bool in) ;
|
||||
|
||||
private:
|
||||
uint32_t _total_item_size ;
|
||||
uint32_t _total_item_count ;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue