WvStreams
include/wvtimeoutstream.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 */
6#ifndef __WVTIMEOUTSTREAM_H
7#define __WVTIMEOUTSTREAM_H
8
9#include "wvstream.h"
10
20class WvTimeoutStream: public WvStream
21{
22 bool ok;
23
24public:
25 WvTimeoutStream(time_t msec);
26 virtual bool isok() const { return ok; }
27
28 virtual void execute();
29
30private:
31 const char *wstype() const { return "WvTimeoutStream"; }
32};
33
34#endif // __WVTIMEOUTSTREAM_H
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
WvTimeoutStream is a stream that becomes !isok() after a configurable number of milliseconds.
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
virtual bool isok() const
return true if the stream is actually usable right now