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

CAsyncFileReader::Callback Class Reference
[Asynchronous I/OI/O BuffersFileIO]

Inheritance diagram for CAsyncFileReader::Callback:

List of all members.


Detailed Description

An interface for users of the CAsyncFileReader to be notified of the results of the asynchronous read operations on the file.

Public Types

enum  OnDataResponse { DoNotIssueNewRead = 0x00, IssueNewRead = 0x01, NewReadAllowed = 0x02 }

Public Member Functions

virtual void OnError (CAsyncFileReader *pInstance, const JetByteTools::Core::_tstring &details, DWORD lastError)=0
 Called when an error occurs during asynchronous processing or file closure.
virtual void OnError (CAsyncFileReader *pInstance, const JetByteTools::Core::_tstring &details)=0
 Called when an error occurs during asynchronous processing or file closure.
virtual void OnError (CAsyncFileReader *pInstance, const JetByteTools::Core::_tstring &where, const JetByteTools::Core::_tstring &what)=0
virtual OnDataResponse OnData (CAsyncFileReader *pInstance, CSmartBuffer &buffer)=0
 Called when an asynchronous read has completed. The data that has been read from the file is located in the buffer. Detach the buffer if you want to keep keep (or pass on) the buffer to something else, leave the buffer attached to the smart pointer if you are done with it. This helps the reader optimise the use of buffers by allowing it to reuse buffers that you don't need.
virtual void OnDone (CAsyncFileReader *pInstance)=0
 Called when the end of the file is reached.

Protected Member Functions

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

Member Enumeration Documentation

Enumerator:
DoNotIssueNewRead 
IssueNewRead 
NewReadAllowed 


Constructor & Destructor Documentation

virtual ~Callback (  )  [protected, virtual]

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


Member Function Documentation

virtual void OnError ( CAsyncFileReader pInstance,
const JetByteTools::Core::_tstring details,
DWORD  lastError 
) [pure virtual]

Called when an error occurs during asynchronous processing or file closure.

virtual void OnError ( CAsyncFileReader pInstance,
const JetByteTools::Core::_tstring details 
) [pure virtual]

Called when an error occurs during asynchronous processing or file closure.

virtual void OnError ( CAsyncFileReader pInstance,
const JetByteTools::Core::_tstring where,
const JetByteTools::Core::_tstring what 
) [pure virtual]

virtual OnDataResponse OnData ( CAsyncFileReader pInstance,
CSmartBuffer buffer 
) [pure virtual]

Called when an asynchronous read has completed. The data that has been read from the file is located in the buffer. Detach the buffer if you want to keep keep (or pass on) the buffer to something else, leave the buffer attached to the smart pointer if you are done with it. This helps the reader optimise the use of buffers by allowing it to reuse buffers that you don't need.

virtual void OnDone ( CAsyncFileReader pInstance  )  [pure virtual]

Called when the end of the file is reached.


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