Gnutella::Handshaking::SlotAllocator Class Reference

#include <SlotAllocator.h> [code]

Inherits QObject.

Inheritance diagram for Gnutella::Handshaking::SlotAllocator:

Inheritance graph
[legend]
Collaboration diagram for Gnutella::Handshaking::SlotAllocator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Todo:
Move out of Handshaking?

Definition at line 40 of file SlotAllocator.h.

Signals

void handshakingSlotFreed ()
void ultrapeerSlotFreed ()
void peerSlotFreed ()
void leafSlotFreed ()

Public Member Functions

 SlotAllocator (LocalPeer *)
 ~SlotAllocator ()
bool isBootstrapping () const
bool isWellConnected () const
bool hasSlotFor (const NodeInfo &) const
bool allocateSlot (HandshakeSession *)
bool allocateSlot (PacketSession *)
uint freeHandshakingSlots () const
uint freeUltrapeerSlots () const
uint freePeerSlots () const
uint freeLeafSlots () const
uint hasFreeUltrapeerSlots () const
uint hasFreePeerSlots () const
uint hasFreeLeafSlots () const

Private Slots

void freeSlot (QObject *)

Private Member Functions

 SlotAllocator (const SlotAllocator &)
SlotAllocatoroperator= (const SlotAllocator &)

Private Attributes

SlotAllocatorPrivatep


Constructor & Destructor Documentation

Gnutella::Handshaking::SlotAllocator::SlotAllocator const SlotAllocator  )  [private]
 

SlotAllocator::SlotAllocator LocalPeer  ) 
 

Definition at line 133 of file SlotAllocator.cpp.

SlotAllocator::~SlotAllocator  ) 
 

Definition at line 140 of file SlotAllocator.cpp.


Member Function Documentation

bool SlotAllocator::allocateSlot PacketSession  ) 
 

Definition at line 174 of file SlotAllocator.cpp.

bool SlotAllocator::allocateSlot HandshakeSession session  ) 
 

The handshaking slots may become negative due to imcomming connections. We are conserned only in limiting the number of outgoing connections.

Definition at line 157 of file SlotAllocator.cpp.

uint SlotAllocator::freeHandshakingSlots  )  const
 

Definition at line 81 of file SlotAllocator.cpp.

uint SlotAllocator::freeLeafSlots  )  const
 

Definition at line 96 of file SlotAllocator.cpp.

uint SlotAllocator::freePeerSlots  )  const
 

Definition at line 91 of file SlotAllocator.cpp.

void SlotAllocator::freeSlot QObject  )  [private, slot]
 

Definition at line 205 of file SlotAllocator.cpp.

uint SlotAllocator::freeUltrapeerSlots  )  const
 

Definition at line 86 of file SlotAllocator.cpp.

void Gnutella::Handshaking::SlotAllocator::handshakingSlotFreed  )  [signal]
 

uint Gnutella::Handshaking::SlotAllocator::hasFreeLeafSlots  )  const [inline]
 

Definition at line 89 of file SlotAllocator.h.

uint Gnutella::Handshaking::SlotAllocator::hasFreePeerSlots  )  const [inline]
 

Definition at line 86 of file SlotAllocator.h.

uint Gnutella::Handshaking::SlotAllocator::hasFreeUltrapeerSlots  )  const [inline]
 

Definition at line 83 of file SlotAllocator.h.

bool SlotAllocator::hasSlotFor const NodeInfo  )  const
 

Definition at line 145 of file SlotAllocator.cpp.

bool SlotAllocator::isBootstrapping  )  const
 

Definition at line 123 of file SlotAllocator.cpp.

bool SlotAllocator::isWellConnected  )  const
 

Definition at line 128 of file SlotAllocator.cpp.

void Gnutella::Handshaking::SlotAllocator::leafSlotFreed  )  [signal]
 

SlotAllocator& Gnutella::Handshaking::SlotAllocator::operator= const SlotAllocator  )  [private]
 

void Gnutella::Handshaking::SlotAllocator::peerSlotFreed  )  [signal]
 

void Gnutella::Handshaking::SlotAllocator::ultrapeerSlotFreed  )  [signal]
 


Member Data Documentation

SlotAllocatorPrivate* Gnutella::Handshaking::SlotAllocator::p [private]
 

Definition at line 80 of file SlotAllocator.h.


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