1 /* $Id: p2_frontend.cpp,v 1.2 2005-10-06 19:33:58 adam Exp $
2 Copyright (c) 1998-2005, Index Data.
4 This file is part of the yaz-proxy.
6 YAZ proxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with YAZ proxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include <yaz/diagbib1.h>
24 #include "p2_frontend.h"
26 using namespace yazpp_1;
29 P2_Frontend::P2_Frontend(IPDU_Observable *the_PDU_Observable,
30 ThreadPoolSocketObserver
31 *my_thread, P2_Server *server)
32 : Z_Assoc(the_PDU_Observable)
34 m_my_thread = my_thread;
38 yaz_log(YLOG_LOG, "Construct P2_Frontend=%p", this);
42 IPDU_Observer *P2_Frontend::sessionNotify(IPDU_Observable
43 *the_PDU_Observable, int fd)
48 P2_Frontend::~P2_Frontend()
50 yaz_log(YLOG_LOG, "Destroy P2_Frontend=%p", this);
52 list<P2_FrontResultSet *>::iterator it;
54 for (it = m_resultSets.begin(); it != m_resultSets.end(); it++)
61 void P2_Frontend::recv_GDU(Z_GDU *z_pdu, int len)
63 GDU *gdu = new GDU(z_pdu);
65 P2_Msg *m = new P2_Msg(gdu, this, m_server);
70 void P2_Frontend::failNotify()
73 if (m_no_requests == 0)
78 void P2_Frontend::timeoutNotify()
81 if (m_no_requests == 0)
85 void P2_Frontend::connectNotify()
93 * indent-tabs-mode: nil
95 * vim: shiftwidth=4 tabstop=8 expandtab