The C++ framework for developing highly scalable, high performance servers on Windows platforms.

ILimitConnections::Creator Class Reference
[RAII - Resource Acquisition Is Initialization]

Collaboration diagram for ILimitConnections::Creator:

List of all members.


Detailed Description

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.

Public Member Functions

 Creator (ILimitConnections &limiter)
 Construct an instance of a Creator that uses the supplied connection limiter to determine if a connection can be created.
 Creator (const Creator &rhs)
 ~Creator ()
 If a call to CanCreateConnection() has succeeded and there hasn't been a call to ConnectionCreated() then we call ILimitConnections::ReleaseConnection().
Creatoroperator= (const Creator &rhs)
bool CanCreateConnection ()
 Query the connection limiter to see if a connection can be created and if it can assume that it is now in the process of being created.
void ConnectionCreated ()
 Confirm that the connection has been created.

Constructor & Destructor Documentation

Creator ( ILimitConnections limiter  )  [explicit]

Construct an instance of a Creator that uses the supplied connection limiter to determine if a connection can be created.

Creator ( const Creator rhs  ) 

~Creator (  ) 

If a call to CanCreateConnection() has succeeded and there hasn't been a call to ConnectionCreated() then we call ILimitConnections::ReleaseConnection().


Member Function Documentation

Creator& operator= ( const Creator rhs  ) 

bool CanCreateConnection (  ) 

Query the connection limiter to see if a connection can be created and if it can assume that it is now in the process of being created.

void ConnectionCreated (  ) 

Confirm that the connection has been created.


Generated on Sun Sep 12 19:10:23 2021 for The Server Framework - v7.4 by doxygen 1.5.3