Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

wvtimeoutstream.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  *
00005  */ 
00006 #ifndef __WVTIMEOUTSTREAM_H
00007 #define __WVTIMEOUTSTREAM_H
00008 
00009 #include "wvstream.h"
00010 
00011 /**
00012  * WvTimeoutStream is a stream that becomes !isok() after a
00013  * configurable number of milliseconds. It will wake up a select(). It
00014  * will return true if select()ed and that the timeout has
00015  * expired. But using it in a WvStreamList will not have it call the
00016  * callback/execute because the WvStreamList checks whether isok() is
00017  * true before doing the select().
00018  */
00019 
00020 class WvTimeoutStream: public WvStream
00021 {
00022     bool ok;
00023 
00024 public:
00025     WvTimeoutStream(time_t msec);
00026     virtual bool isok() const { return ok; }
00027 
00028     virtual void execute();
00029 };
00030 
00031 #endif // __WVTIMEOUTSTREAM_H

Generated on Sat Mar 13 14:55:59 2004 for WvStreams by doxygen 1.3.6-20040222