X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fsocket-manager.h;h=d86297cf2f52ea2bc45f78ee1b518740af35802a;hb=86726b00b052694e65b036c262f5fe9096554175;hp=b293965f54a6d4e857b2998187714aa49814dcf5;hpb=ceb226cb18d96a6b3aa2dd6cff94aa27850362cf;p=yazpp-moved-to-github.git diff --git a/include/yaz++/socket-manager.h b/include/yaz++/socket-manager.h index b293965..d86297c 100644 --- a/include/yaz++/socket-manager.h +++ b/include/yaz++/socket-manager.h @@ -1,8 +1,8 @@ /* - * 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 @@ -11,6 +11,8 @@ #include #include +namespace yazpp_1 { + /** Simple Socket Manager. Implements a stand-alone simple model that uses select(2) to observe socket events. @@ -21,8 +23,8 @@ class YAZ_EXPORT Yaz_SocketManager : public IYazSocketObservable { IYazSocketObserver *observer; int fd; unsigned mask; - unsigned timeout; - unsigned timeout_this; + int timeout; + int timeout_this; time_t last_activity; YazSocketEntry *next; }; @@ -53,12 +55,13 @@ class YAZ_EXPORT Yaz_SocketManager : public IYazSocketObservable { 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