31 #include "ListenThread.h"
33 #include "ServerThread.h"
35 #include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
36 #include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
37 #include <hu/varadiistvan/scpl/io/TCPServerSocket.h>
38 #include <hu/varadiistvan/scpl/io/TCPAcceptor.h>
39 #include <hu/varadiistvan/xplcommon/Util.h>
45 using hu::varadiistvan::scpl::io::LocalServerSocket;
46 using hu::varadiistvan::scpl::io::LocalAcceptor;
47 using hu::varadiistvan::scpl::io::TCPServerSocket;
48 using hu::varadiistvan::scpl::io::TCPAcceptor;
49 using hu::varadiistvan::xplcommon::Util;
53 void ListenThread::run()
55 Util::debug(
"xplra::ListenThread::run: started\n");
57 LocalServerSocket localSocket(
"xplra", &
waiter);
58 LocalAcceptor& localAcceptor = localSocket.getAcceptor();
61 TCPAcceptor& tcpAcceptor = tcpSocket.getAcceptor();
64 !localAcceptor.failed() && !tcpAcceptor.failed()) {
65 while (localAcceptor.accept()) {
69 serverThread->start();
71 while (tcpAcceptor.accept()) {
75 serverThread->start();
82 Util::debug(
"xplra::ListenThread::run: quitting\n");
hu::varadiistvan::scpl::io::WaitableEvent quitEvent
hu::varadiistvan::scpl::io::Waiter waiter
static const unsigned short defaultTCPPort
RequestQueue requestQueue