JetByteTools::Socket::ILimitConnections Class Reference
[InterfacesProtected non-virtual destructors on abstract base classes]

Inherited by JetByteTools::Socket::CConnectionLimiter.

Inheritance diagram for JetByteTools::Socket::ILimitConnections:

Inheritance graph
[legend]
List of all members.

Detailed Description

An interface to an object that manages the number of connections currently in progress and that can disallow any more connections being made. Call CanCreateConnection() when you wish to create a new connection and if it returns true then you can create your connection and call ReleaseConnection() when the connection terminates. If it returns false then you should not create your connection.


Public Member Functions

virtual bool CanCreateConnection ()=0
 Called to determine if a connection can be created. If this returns true then it's assumed that a connection will be created and that when the connection is no longer operational that ReleaseConnection() will be called.
virtual void ReleaseConnection ()=0
 Called when a connection, that was created after CanCreateConnection() has returned true, is no longer operational.

Protected Member Functions

 ~ILimitConnections ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Classes

class  Creator
 A class that takes ownership of an attempt at connection creation. That is if you call CanCreateConnection() through it and then do not call ConnectionCreated() then the destructor will assume something went awry and call ReleaseConnection(). This class can therefore be used to support scope based connection creation. More...


Constructor & Destructor Documentation

JetByteTools::Socket::ILimitConnections::~ILimitConnections (  )  [inline, protected]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual bool JetByteTools::Socket::ILimitConnections::CanCreateConnection (  )  [pure virtual]

Called to determine if a connection can be created. If this returns true then it's assumed that a connection will be created and that when the connection is no longer operational that ReleaseConnection() will be called.

Implemented in JetByteTools::Socket::CConnectionLimiter.

virtual void JetByteTools::Socket::ILimitConnections::ReleaseConnection (  )  [pure virtual]

Called when a connection, that was created after CanCreateConnection() has returned true, is no longer operational.

Implemented in JetByteTools::Socket::CConnectionLimiter.


Generated on Tue May 8 17:48:02 2007 for JetByte Socket Tools by  doxygen 1.5.2