C12Adapter Opensource C++ Interface
MStreamSocket::OperationHandler Class Referenceabstract

Generic class that can be used for cancellation of open socket operation. More...

Public Member Functions

virtual ~OperationHandler ()
 Virtual destructor of the class. More...
 
virtual void CheckIfCancelled ()=0
 This method shall be overwritten to check if the socket opening shall be canceled. More...
 

Detailed Description

Generic class that can be used for cancellation of open socket operation.

Open socket methods have optional pointer to a child of this class and if it is given, they will periodically call OperationHandler::CheckIfCancelled. In this method, specific implementations shall throw an exception if opening needs to be canceled.

Constructor & Destructor Documentation

virtual MStreamSocket::OperationHandler::~OperationHandler ( )
inlinevirtual

Virtual destructor of the class.

The abstract implementation does nothing.

Member Function Documentation

virtual void MStreamSocket::OperationHandler::CheckIfCancelled ( )
pure virtual

This method shall be overwritten to check if the socket opening shall be canceled.

If application decides the operation shall be canceled, it shall throw any desired exception from this call, typically MEOperationCancelled.