5 #ifndef BALL_SYSTEM_NETWORKING_H
6 #define BALL_SYSTEM_NETWORKING_H
8 #ifndef BALL_COMMON_GLOBAL_HH
12 #ifndef BALL_DATATYPE_STRING_H
16 #ifdef BALL_HAS_BOOST_ASIO
17 # include <boost/asio.hpp>
19 #define BOOST_DATE_TIME_NO_LIB
20 #define BOOST_REGEX_NO_LIB
24 #include <QtCore/QThread>
36 :
public BALL_ASIO_NAMESPACE::ip::tcp::iostream
40 : BALL_ASIO_NAMESPACE::ip::tcp::iostream()
45 : BALL_ASIO_NAMESPACE::ip::tcp::iostream(hostname, protocol)
50 : BALL_ASIO_NAMESPACE::ip::tcp::iostream(hostname,
String(port))
72 acceptor_(io_service_)
77 virtual void activate();
78 virtual void deactivate();
80 virtual void startAccepting();
81 virtual void handleConnection();
82 virtual void connectionRequested();
84 void setPort(
Size port);
108 virtual void deactivate();
109 virtual void activate_async();
110 virtual void handleAsyncConnection();
111 virtual void handleClose();
122 #endif // BALL_SYSTEM_NETWORKING_H
TCPIOStream(const String &hostname, Position port)
TCPIOStream connected_stream_
BALL_ASIO_NAMESPACE::io_service io_service_
TCPIOStream(const String &hostname, const String &protocol)
BALL_ASIO_NAMESPACE::ip::tcp::acceptor acceptor_
TCPServer(Size port, bool restart=true)