projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added skeleton of yaz-z-server.
[yazpp-moved-to-github.git]
/
include
/
yaz-pdu-assoc.h
diff --git
a/include/yaz-pdu-assoc.h
b/include/yaz-pdu-assoc.h
index
425a230
..
3ff7ff5
100644
(file)
--- a/
include/yaz-pdu-assoc.h
+++ b/
include/yaz-pdu-assoc.h
@@
-1,19
+1,11
@@
/*
/*
- * Copyright (c) 1998-1999, Index Data.
+ * Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
* See the file LICENSE for details.
- * Sebastian Hammer, Adam Dickmeiss
*
*
- * $Log: yaz-pdu-assoc.h,v $
- * 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.8 2000-09-08 10:23:42 adam Exp $
*/
*/
-#include <comstack.h>
+#include <yaz/comstack.h>
#include <yaz-socket-observer.h>
#include <yaz-pdu-observer.h>
#include <yaz-socket-observer.h>
#include <yaz-pdu-observer.h>
@@
-23,9
+15,9
@@
the method connect. The server role is initiated by using the
listen method.
*/
the method connect. The server role is initiated by using the
listen method.
*/
-class Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver {
+class YAZ_EXPORT Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver {
private:
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);
class PDU_Queue {
public:
PDU_Queue(const char *buf, int len);
@@
-46,9
+38,11
@@
class Yaz_PDU_Assoc : public IYaz_PDU_Observable, IYazSocketObserver {
PDU_Queue *m_queue_out;
int Yaz_PDU_Assoc::flush_PDU();
int *m_destroyed;
PDU_Queue *m_queue_out;
int Yaz_PDU_Assoc::flush_PDU();
int *m_destroyed;
+ int m_idleTime;
+ int m_log;
public:
/// Create object using specified socketObservable
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
/// Close socket and destroy object.
virtual ~Yaz_PDU_Assoc();
/// Clone the object
@@
-59,10
+53,16
@@
class 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);
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();
/// 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);
};
};