Modified for new location of YAZ header files. Experimental threaded
[yazpp-moved-to-github.git] / include / yaz-pdu-assoc.h
index c5930c4..205c7ed 100644 (file)
@@ -3,23 +3,10 @@
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  * 
- * $Log: yaz-pdu-assoc.h,v $
- * Revision 1.4  1999-03-23 14:17:57  adam
- * More work on timeout handling. Work on yaz-client.
- *
- * Revision 1.3  1999/02/02 14:01:13  adam
- * First WIN32 port of YAZ++.
- *
- * Revision 1.2  1999/01/28 13:08:40  adam
- * Yaz_PDU_Assoc better encapsulated. Memory leak fix in
- * yaz-socket-manager.cc.
- *
- * Revision 1.1.1.1  1999/01/28 09:41:07  adam
- * First implementation of YAZ++.
- *
+ * $Id: yaz-pdu-assoc.h,v 1.7 1999-12-06 13:52:45 adam Exp $
  */
 
-#include <comstack.h>
+#include <yaz/comstack.h>
 #include <yaz-socket-observer.h>
 #include <yaz-pdu-observer.h>
 
@@ -31,7 +18,7 @@
  */
 class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver {
  private:
-    enum { Connecting, Connected, Listen, Ready, Closed } m_state;
+    enum { Connecting, Listen, Ready, Closed } m_state;
     class PDU_Queue {
     public:
        PDU_Queue(const char *buf, int len);
@@ -53,9 +40,10 @@ class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver
     int Yaz_PDU_Assoc::flush_PDU();
     int *m_destroyed;
     int m_idleTime;
+    int m_log;
  public:
     /// Create object using specified socketObservable
-    Yaz_PDU_Assoc(IYazSocketObservable *socketObservable, COMSTACK cs);
+    Yaz_PDU_Assoc(IYazSocketObservable *socketObservable);
     /// Close socket and destroy object.
     virtual ~Yaz_PDU_Assoc();
     /// Clone the object
@@ -66,6 +54,8 @@ class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver
     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
@@ -74,4 +64,6 @@ class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver
     void destroy();
     /// Set Idle Time
     void idleTime (int timeout);
+    /// Child start...
+    virtual void childNotify(int fd);
 };