• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

net::SocketGroup

net::SocketGroup Class Reference

#include <socketgroup.h>

List of all members.


Detailed Description

Author:
Joris Guisson <joris.guisson@gmail.com>

Definition at line 35 of file socketgroup.h.


Public Member Functions

void add (BufferedSocket *s)
void calcAllowance (bt::TimeStamp now)
void clear ()
bool download (Uint32 &global_allowance, bt::TimeStamp now)
Uint32 getAssuredAllowance () const
Uint32 numSockets () const
void setAssuredRate (Uint32 as)
void setLimit (Uint32 lim)
 SocketGroup (Uint32 limit, Uint32 assured_rate)
bool upload (Uint32 &global_allowance, bt::TimeStamp now)
virtual ~SocketGroup ()

Constructor & Destructor Documentation

net::SocketGroup::SocketGroup ( Uint32  limit,
Uint32  assured_rate 
)

Definition at line 31 of file socketgroup.cpp.

net::SocketGroup::~SocketGroup (  )  [virtual]

Definition at line 39 of file socketgroup.cpp.


Member Function Documentation

void net::SocketGroup::add ( BufferedSocket *  s  )  [inline]

Add a socket for processing.

Definition at line 51 of file socketgroup.h.

void net::SocketGroup::calcAllowance ( bt::TimeStamp  now  ) 

Calculate the allowance for this group.

Parameters:
now Current timestamp

Definition at line 118 of file socketgroup.cpp.

void net::SocketGroup::clear (  )  [inline]

Clear the lists of sockets.

Definition at line 48 of file socketgroup.h.

bool net::SocketGroup::download ( Uint32 &  global_allowance,
bt::TimeStamp  now 
)

Process all the sockets in the vector for download.

Parameters:
global_allowance How much the group can do, this will be updated, 0 means no limit
now Current time
Returns:
true if we can download more data, false otherwise

Definition at line 108 of file socketgroup.cpp.

Uint32 net::SocketGroup::getAssuredAllowance (  )  const [inline]

Get the assured allowance .

Definition at line 93 of file socketgroup.h.

Uint32 net::SocketGroup::numSockets (  )  const [inline]

Get the number of sockets.

Definition at line 82 of file socketgroup.h.

void net::SocketGroup::setAssuredRate ( Uint32  as  )  [inline]

Set the assured rate for the gorup in bytes per sec.

Parameters:
as The assured rate

Definition at line 79 of file socketgroup.h.

void net::SocketGroup::setLimit ( Uint32  lim  )  [inline]

Set the group limit in bytes per sec.

Parameters:
lim The limit

Definition at line 73 of file socketgroup.h.

bool net::SocketGroup::upload ( Uint32 &  global_allowance,
bt::TimeStamp  now 
)

Process all the sockets in the vector for upload.

Parameters:
global_allowance How much the group can do, this will be updated, 0 means no limit
now Current time
Returns:
true if we can upload more data, false otherwise

Definition at line 113 of file socketgroup.cpp.


The documentation for this class was generated from the following files:
  • socketgroup.h
  • socketgroup.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal