BALL 1.5.0
Public Member Functions | Protected Attributes | List of all members
BALL::TCPServerThread Class Reference

#include <BALL/SYSTEM/networking.h>

Inheritance diagram for BALL::TCPServerThread:
BALL::TCPServer QThread BALL::VIEW::ServerWidget::BALLViewServer

Public Member Functions

 TCPServerThread (Size port, bool asynchronous=true, bool restart=true)
 
virtual void run ()
 
virtual void deactivate ()
 
virtual void activate_async ()
 
virtual void handleAsyncConnection ()
 
virtual void handleClose ()
 
bool isRunning ()
 
- Public Member Functions inherited from BALL::TCPServer
 TCPServer (Size port, bool restart=true)
 
virtual ~TCPServer ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void startAccepting ()
 
virtual void handleConnection ()
 
virtual void connectionRequested ()
 
void setPort (Size port)
 
Size getPort () const
 

Protected Attributes

bool use_async_io_
 
bool is_running_
 
- Protected Attributes inherited from BALL::TCPServer
Size port_
 
bool restart_
 
TCPIOStream connected_stream_
 
boost::asio::io_service io_service_
 
boost::asio::ip::tcp::acceptor acceptor_
 

Detailed Description

This class provides a simple TCP Server running in its own QThread.

Definition at line 94 of file networking.h.

Constructor & Destructor Documentation

◆ TCPServerThread()

BALL::TCPServerThread::TCPServerThread ( Size  port,
bool  asynchronous = true,
bool  restart = true 
)

Member Function Documentation

◆ activate_async()

virtual void BALL::TCPServerThread::activate_async ( )
virtual

◆ deactivate()

virtual void BALL::TCPServerThread::deactivate ( )
virtual

Reimplemented from BALL::TCPServer.

◆ handleAsyncConnection()

virtual void BALL::TCPServerThread::handleAsyncConnection ( )
virtual

◆ handleClose()

virtual void BALL::TCPServerThread::handleClose ( )
virtual

◆ isRunning()

bool BALL::TCPServerThread::isRunning ( )

Returns the state of the server.

◆ run()

virtual void BALL::TCPServerThread::run ( )
virtual

Member Data Documentation

◆ is_running_

bool BALL::TCPServerThread::is_running_
protected

Definition at line 112 of file networking.h.

◆ use_async_io_

bool BALL::TCPServerThread::use_async_io_
protected

Definition at line 111 of file networking.h.