/*
- * Copyright (c) 1998-2000, Index Data.
+ * Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: socket-manager.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: socket-manager.h,v 1.4 2005-06-02 06:40:21 adam Exp $
*/
#ifndef YAZ_SOCKET_MANAGER_INCLUDED
#include <yaz++/socket-observer.h>
#include <time.h>
+namespace yazpp_1 {
+
/** Simple Socket Manager.
Implements a stand-alone simple model that uses select(2) to
observe socket events.
IYazSocketObserver *observer;
int fd;
unsigned mask;
- unsigned timeout;
- unsigned timeout_this;
+ int timeout;
+ int timeout_this;
time_t last_activity;
YazSocketEntry *next;
};
virtual void maskObserver(IYazSocketObserver *observer, int mask);
/// Set timeout
virtual void timeoutObserver(IYazSocketObserver *observer,
- unsigned timeout);
+ int timeout);
/// Process one event. return > 0 if event could be processed;
- int Yaz_SocketManager::processEvent();
+ int processEvent();
Yaz_SocketManager();
virtual ~Yaz_SocketManager();
};
+};
#endif