Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Protected Attributes | List of all members
TestHost Class Reference

Only used for testing. More...

Inheritance diagram for TestHost:
[legend]
Collaboration diagram for TestHost:
[legend]

Public Member Functions

 TestHost ()
 
virtual ~TestHost ()
 
void start ()
 
void doWork ()
 Called continuously following sleep for m_idleWaitMs. More...
 
void doneWorking ()
 Called when is to be stopped, just prior to thread being joined. More...
 

Protected Attributes

ba::io_service m_io
 

Additional Inherited Members

- Protected Member Functions inherited from dev::Worker
 Worker (std::string const &_name="anon", unsigned _idleWaitMs=30)
 
 Worker (Worker &&_m)
 Move-constructor. More...
 
Workeroperator= (Worker &&_m)
 Move-assignment. More...
 
virtual ~Worker ()
 
void setName (std::string _n)
 Allows changing worker name if work is stopped. More...
 
void startWorking ()
 Starts worker thread; causes startedWorking() to be called. More...
 
void stopWorking ()
 Stop worker thread; causes call to stopWorking(). More...
 
bool isWorking () const
 Returns if worker thread is present. More...
 
virtual void startedWorking ()
 Called after thread is started from startWorking(). More...
 
virtual void workLoop ()
 Overrides doWork(); should call shouldStop() often and exit when true. More...
 
bool shouldStop () const
 

Detailed Description

Only used for testing.

Not useful beyond tests.

Definition at line 49 of file net.cpp.

Constructor & Destructor Documentation

TestHost::TestHost ( )
inline

Definition at line 52 of file net.cpp.

virtual TestHost::~TestHost ( )
inlinevirtual

Definition at line 53 of file net.cpp.

Member Function Documentation

void TestHost::doneWorking ( )
inlinevirtual

Called when is to be stopped, just prior to thread being joined.

Reimplemented from dev::Worker.

Definition at line 56 of file net.cpp.

void TestHost::doWork ( )
inlinevirtual

Called continuously following sleep for m_idleWaitMs.

Reimplemented from dev::Worker.

Definition at line 55 of file net.cpp.

void TestHost::start ( )
inline

Definition at line 54 of file net.cpp.

Here is the caller graph for this function:

Member Data Documentation

ba::io_service TestHost::m_io
protected

Definition at line 59 of file net.cpp.


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