X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz-pdu-assoc.h;fp=include%2Fyaz-pdu-assoc.h;h=0000000000000000000000000000000000000000;hb=e3133d2f2c580f76c9da2e7621c74a064f0955c9;hp=6576bb1728e30030e76ec3223ec40b873459dd19;hpb=b35b70078e2c4fb3af710cfc5b9319bfcc7073dd;p=yazpp-moved-to-github.git diff --git a/include/yaz-pdu-assoc.h b/include/yaz-pdu-assoc.h deleted file mode 100644 index 6576bb1..0000000 --- a/include/yaz-pdu-assoc.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1998-2000, Index Data. - * See the file LICENSE for details. - * - * $Id: yaz-pdu-assoc.h,v 1.11 2000-09-12 16:40:33 heikki Exp $ - */ - -#ifndef YAZ_PDU_ASSOC_INCLUDED -#define YAZ_PDU_ASSOC_INCLUDED - -#include -#include -#include - -/** Simple Protocol Data Unit Assocation. - This object sends - and receives PDU's using the COMSTACK - network utility. To use the association in client role, use - the method connect. The server role is initiated by using the - listen method. - */ -class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver { - private: - enum { Connecting, Listen, Ready, Closed } m_state; - class PDU_Queue { - public: - PDU_Queue(const char *buf, int len); - PDU_Queue::~PDU_Queue(); - char *m_buf; - int m_len; - PDU_Queue *m_next; - }; - Yaz_PDU_Assoc *m_parent; - Yaz_PDU_Assoc *m_children; - Yaz_PDU_Assoc *m_next; - COMSTACK m_cs; - IYazSocketObservable *m_socketObservable; - IYaz_PDU_Observer *m_PDU_Observer; - char *m_input_buf; - int m_input_len; - PDU_Queue *m_queue_out; - int Yaz_PDU_Assoc::flush_PDU(); - int *m_destroyed; - int m_idleTime; - int m_log; - public: - COMSTACK comstack(); - /// Create object using specified socketObservable - Yaz_PDU_Assoc(IYazSocketObservable *socketObservable); - /// Close socket and destroy object. - /// virtual ~Yaz_PDU_Assoc(); - /// Clone the object - IYaz_PDU_Observable *clone(); - /// Send PDU - int send_PDU(const char *buf, int len); - /// connect to server (client role) - void connect(IYaz_PDU_Observer *observer, const char *addr); - /// listen for clients (server role) - void listen(IYaz_PDU_Observer *observer, const char *addr); - /// open with existing socket - void socket(IYaz_PDU_Observer *observer, int fd); - /// Socket notification - void socketNotify(int event); - /// Close socket - void close(); - /// Close and destroy - void destroy(); - /// Set Idle Time - void idleTime (int timeout); - /// Child start... - virtual void childNotify(int fd); -}; - -#endif \ No newline at end of file