* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: pdu-observer.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: pdu-observer.h,v 1.5 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_PDU_OBSERVER_H
#define YAZ_PDU_OBSERVER_H
+namespace yazpp_1 {
+
class IYaz_PDU_Observer;
/** Protocol Data Unit Observable.
/// Send encoded PDU buffer of specified length
virtual int send_PDU(const char *buf, int len) = 0;
/// Connect with server specified by addr.
- virtual void connect(IYaz_PDU_Observer *observer, const char *addr) = 0;
+ virtual int connect(IYaz_PDU_Observer *observer, const char *addr) = 0;
/// Listen on address addr.
- virtual void listen(IYaz_PDU_Observer *observer, const char *addr) = 0;
+ virtual int listen(IYaz_PDU_Observer *observer, const char *addr) = 0;
/// Close connection
virtual void close() = 0;
/// Make clone of this object using this interface
virtual void destroy() = 0;
/// Set Idle Time
virtual void idleTime (int timeout) = 0;
+ /// Get peername
+ virtual const char *getpeername() = 0;
};
/** Protocol Data Unit Observer.
virtual IYaz_PDU_Observer *sessionNotify(
IYaz_PDU_Observable *the_PDU_Observable, int fd) = 0;
};
+};
#endif