X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fex_filter_frontend_net.cpp;h=76264f91657960edd06e930f090747a1a6e22522;hb=f82b19f2b93707657fee804bd1242f2548d51ada;hp=23c5aa19d48f22bb7e7a159b5d268aa91e2026e3;hpb=941d13b6a4dc2c2dd0e4bda89d380bfd8991b03b;p=metaproxy-moved-to-github.git diff --git a/src/ex_filter_frontend_net.cpp b/src/ex_filter_frontend_net.cpp index 23c5aa1..76264f9 100644 --- a/src/ex_filter_frontend_net.cpp +++ b/src/ex_filter_frontend_net.cpp @@ -1,3 +1,8 @@ +/* $Id: ex_filter_frontend_net.cpp,v 1.7 2005-10-15 14:09:09 adam Exp $ + Copyright (c) 2005, Index Data. + +%LICENSE% + */ #include #include @@ -9,20 +14,21 @@ namespace po = boost::program_options; #include "config.hpp" #include "filter_frontend_net.hpp" +#include "filter_log.hpp" #include "router.hpp" #include "session.hpp" #include "package.hpp" -class FilterInit: public yp2::Filter { +class FilterInit: public yp2::filter::Base { public: void process(yp2::Package & package) const { - + if (package.session().is_closed()) { // std::cout << "Got Close.\n"; } - + Z_GDU *gdu = package.request().get(); if (gdu) { @@ -94,8 +100,8 @@ int main(int argc, char **argv) yp2::RouterChain router; - // put in frontend first - yp2::FilterFrontendNet filter_front; + // put frontend filter in router + yp2::filter::FrontendNet filter_front; filter_front.ports() = ports; // 0=no time, >0 timeout in seconds @@ -104,7 +110,11 @@ int main(int argc, char **argv) } router.rule(filter_front); - // put in a backend + // put log filter in router + yp2::filter::Log filter_log; + router.rule(filter_log); + + // put backend init filter in router FilterInit filter_init; router.rule(filter_init); @@ -126,6 +136,7 @@ int main(int argc, char **argv) * Local variables: * c-basic-offset: 4 * indent-tabs-mode: nil + * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */