X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_frontend_net.cpp;h=d610ceeaa42c5173b745ef53f2ad2151886a0087;hb=941d13b6a4dc2c2dd0e4bda89d380bfd8991b03b;hp=ba81508100ece3ddbee1cc9f90e8605ab1356e40;hpb=5ed8cae5f8518ca4502a51f3884b323f4dbd744a;p=metaproxy-moved-to-github.git diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index ba81508..d610cee 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -176,8 +176,9 @@ ZAssocServer::ZAssocServer(yazpp_1::IPDU_Observable *the_PDU_Observable, yazpp_1::IPDU_Observer *ZAssocServer::sessionNotify(yazpp_1::IPDU_Observable *the_PDU_Observable, int fd) { - ZAssocServerChild *my = new ZAssocServerChild(the_PDU_Observable, m_thread_pool_observer, - m_package); + ZAssocServerChild *my = + new ZAssocServerChild(the_PDU_Observable, m_thread_pool_observer, + m_package); return my; } @@ -204,7 +205,6 @@ void ZAssocServer::connectNotify() FilterFrontendNet::FilterFrontendNet() { m_no_threads = 5; - m_listen_address = "@:9001"; m_listen_duration = 0; } @@ -249,25 +249,36 @@ void FilterFrontendNet::process(Package &package) const { if (m_listen_duration) tt = new My_Timer_Thread(&mySocketManager, m_listen_duration); - yazpp_1::PDU_Assoc *my_PDU_Assoc = - new yazpp_1::PDU_Assoc(&mySocketManager); - ThreadPoolSocketObserver threadPool(&mySocketManager, m_no_threads); - ZAssocServer z(my_PDU_Assoc, &threadPool, &package); - z.server(m_listen_address.c_str()); + ZAssocServer **az = new ZAssocServer *[m_ports.size()]; + + // Create ZAssocServer for each port + size_t i; + for (i = 0; iserver(m_ports[i].c_str()); + } while (mySocketManager.processEvent() > 0) { if (tt && tt->timeout()) break; } + for (i = 0; i &FilterFrontendNet::ports() { - return m_listen_address; + return m_ports; } int &FilterFrontendNet::listen_duration()