X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyazproxy%2Fproxy.h;h=dc56028bf7c861f87b0feff630e756ae361be49c;hb=e7f41bcf7b9b13a3a744ade63f5c00ba9097c990;hp=da7830168d99df3601937d9440bf904f107da5c3;hpb=ee8cfba95daa813ea4dd66ba9e99066db5e5b967;p=yazproxy-moved-to-github.git diff --git a/include/yazproxy/proxy.h b/include/yazproxy/proxy.h index da78301..dc56028 100644 --- a/include/yazproxy/proxy.h +++ b/include/yazproxy/proxy.h @@ -1,4 +1,4 @@ -/* $Id: proxy.h,v 1.19 2005-06-08 13:29:03 adam Exp $ +/* $Id: proxy.h,v 1.21 2005-06-21 18:46:04 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -28,6 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#include #include class Yaz_Proxy; @@ -55,6 +56,8 @@ class Msg_Thread; class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { friend class Proxy_Msg; private: + char *m_peername; + int m_ref_count; char *get_cookie(Z_OtherInformation **otherInfo); char *get_proxy(Z_OtherInformation **otherInfo); void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo, @@ -63,7 +66,6 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { const char *proxy_host); void srw_get_client(const char *db, const char **backend_db); Z_APDU *result_set_optimize(Z_APDU *apdu); - void shutdown(); void releaseClient(); Yaz_ProxyClient *m_client; yazpp_1::IPDU_Observable *m_PDU_Observable; @@ -91,6 +93,14 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { int m_bytes_sent; int m_bytes_recv; int m_bw_max; + + yazpp_1::GDU *m_timeout_gdu; + enum timeout_mode { + timeout_normal, + timeout_reduce, + timeout_xsl + } m_timeout_mode; + Yaz_bw m_bw_stat; int m_pdu_max; Yaz_bw m_pdu_stat; @@ -113,7 +123,7 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { int m_reconfig_flag; Yaz_ProxyConfig *check_reconfigure(); int m_request_no; - int m_invalid_session; + int m_flag_invalid_session; YAZ_Proxy_MARCXML_mode m_marcxml_mode; void *m_stylesheet_xsp; // Really libxslt's xsltStylesheetPtr int m_stylesheet_offset; @@ -178,16 +188,26 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { char *m_usemarcon_ini_stage2; Yaz_usemarcon *m_usemarcon; Yaz_CharsetConverter *m_charset_converter; + yazpp_1::GDUQueue m_in_queue; public: Yaz_Proxy(yazpp_1::IPDU_Observable *the_PDU_Observable, yazpp_1::ISocketObservable *the_socket_observable, Yaz_Proxy *parent = 0); ~Yaz_Proxy(); + + + void inc_ref(); + bool dec_ref(); + + int handle_authentication(Z_APDU *apdu); void result_authentication(Z_APDU *apdu, int ret); void handle_init(Z_APDU *apdu); void inc_request_no(); void recv_GDU(Z_GDU *apdu, int len); + void recv_GDU_reduce(yazpp_1::GDU *gdu); + void recv_GDU_normal(yazpp_1::GDU *gdu); + void recv_GDU_more(); void handle_incoming_HTTP(Z_HTTP_Request *req); void handle_incoming_Z_PDU(Z_APDU *apdu); void handle_incoming_Z_PDU_2(Z_APDU *apdu);