OpenDaVINCI  4.15.3
odcore::wrapper::WIN32Impl::WIN32TCPAcceptor Class Reference

#include <WIN32TCPAcceptor.h>

Inheritance diagram for odcore::wrapper::WIN32Impl::WIN32TCPAcceptor:
Inheritance graph

Public Member Functions

 WIN32TCPAcceptor (const uint32_t &port)
 
virtual ~WIN32TCPAcceptor ()
 
virtual void setAcceptorListener (odcore::io::tcp::TCPAcceptorListener *listener)
 
virtual void start ()
 
virtual void stop ()
 
virtual bool isRunning ()
 
virtual void run ()
 

Protected Member Functions

void invokeAcceptorListener (std::shared_ptr< odcore::io::tcp::TCPConnection > connection)
 

Protected Attributes

unique_ptr< Threadm_thread
 
unique_ptr< Mutexm_listenerMutex
 
odcore::io::tcp::TCPAcceptorListenerm_listener
 
int32_t m_fileDescriptor
 
int32_t m_port
 

Constructor & Destructor Documentation

odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::WIN32TCPAcceptor ( const uint32_t &  port)
odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::~WIN32TCPAcceptor ( )
virtual

Member Function Documentation

void odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::invokeAcceptorListener ( std::shared_ptr< odcore::io::tcp::TCPConnection connection)
protected
bool odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::isRunning ( )
virtual

This method returns true, iff this runnable is in its internal state for running.

Returns
true iff this runnable is in its internal state for running.

Implements odcore::wrapper::Runnable.

References m_thread.

Referenced by run().

void odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::run ( )
virtual

This method implements the body of the function to be "threadified".

Implements odcore::wrapper::Runnable.

References invokeAcceptorListener(), isRunning(), and m_fileDescriptor.

void odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::setAcceptorListener ( odcore::io::tcp::TCPAcceptorListener listener)
virtual

Implements odcore::io::tcp::TCPAcceptor.

References m_listener, and m_listenerMutex.

Referenced by ~WIN32TCPAcceptor().

void odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::start ( )
virtual

Implements odcore::io::tcp::TCPAcceptor.

References m_thread.

void odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::stop ( )
virtual

Implements odcore::io::tcp::TCPAcceptor.

References m_thread.

Member Data Documentation

int32_t odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::m_fileDescriptor
protected
odcore::io::tcp::TCPAcceptorListener* odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::m_listener
protected
unique_ptr<Mutex> odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::m_listenerMutex
protected
int32_t odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::m_port
protected
unique_ptr<Thread> odcore::wrapper::WIN32Impl::WIN32TCPAcceptor::m_thread
protected