X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=include%2Fyazproxy%2Fproxy.h;h=372d9c081ab50c524410e40521feb38550b21691;hp=7f1c873a0d286aad3cec83cba6026560323588ed;hb=cd0944555bef68c40d05f404b2076dfe2d68fd3b;hpb=654c4c47282bad586232db5e5cfbfa97035f1bad diff --git a/include/yazproxy/proxy.h b/include/yazproxy/proxy.h index 7f1c873..372d9c0 100644 --- a/include/yazproxy/proxy.h +++ b/include/yazproxy/proxy.h @@ -1,4 +1,4 @@ -/* $Id: proxy.h,v 1.20 2005-06-10 22:54:22 adam Exp $ +/* $Id: proxy.h,v 1.25 2005-10-13 09:58:52 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -28,6 +28,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#include +#include #include class Yaz_Proxy; @@ -55,13 +57,14 @@ 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, - char **charstes, char **langs, int *selected); + char **charstes, char **langs, int *selected); Yaz_ProxyClient *get_client(Z_APDU *apdu, const char *cookie, - const char *proxy_host); + const char *proxy_host); void srw_get_client(const char *db, const char **backend_db); Z_APDU *result_set_optimize(Z_APDU *apdu); void releaseClient(); @@ -91,15 +94,25 @@ 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_busy, + timeout_normal, + timeout_reduce, + timeout_xsl + } m_timeout_mode; + + int m_connect_max; + int m_search_max; Yaz_bw m_bw_stat; int m_pdu_max; Yaz_bw m_pdu_stat; - Z_GDU *m_bw_hold_PDU; int m_max_record_retrieve; void handle_max_record_retrieve(Z_APDU *apdu); void display_diagrecs(Z_DiagRec **pp, int num); Z_Records *create_nonSurrogateDiagnostics(ODR o, int error, - const char *addinfo); + const char *addinfo); Z_APDU *handle_query_validation(Z_APDU *apdu); Z_APDU *handle_query_transformation(Z_APDU *apdu); @@ -113,7 +126,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; @@ -158,9 +171,9 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { int send_http_response(int code); int send_srw_response(Z_SRW_PDU *srw_pdu); int send_srw_explain_response(Z_SRW_diagnostic *diagnostics, - int num_diagnostics); + int num_diagnostics); int z_to_srw_diag(ODR o, Z_SRW_searchRetrieveResponse *srw_res, - Z_DefaultDiagFormat *ddf); + Z_DefaultDiagFormat *ddf); int m_http_keepalive; const char *m_http_version; yazpp_1::Yaz_cql2rpn m_cql2rpn; @@ -178,10 +191,11 @@ 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); + yazpp_1::ISocketObservable *the_socket_observable, + Yaz_Proxy *parent = 0); ~Yaz_Proxy(); @@ -194,11 +208,14 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { 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(bool normal); 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); IPDU_Observer *sessionNotify(yazpp_1::IPDU_Observable *the_PDU_Observable, - int fd); + int fd); void failNotify(); void timeoutNotify(); void connectNotify(); @@ -225,3 +242,11 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc { }; #endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +