WvStreams
wvtimeoutstream.cc
1 /*
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  * See wvtimeoutstream.h.
6  */
7 #include "wvtimeoutstream.h"
8 
9 WvTimeoutStream::WvTimeoutStream(time_t msec) :
10  ok(true)
11 {
12  alarm(msec);
13 }
14 
16 {
18 
19  // reset the alarm if it has gone off
20  if (alarm_was_ticking) ok = false;
21 }
WvStream::execute
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
Definition: wvstream.h:652
WvStream::alarm_was_ticking
bool alarm_was_ticking
This will be true during callback execution if the callback was triggered by the alarm going off.
Definition: wvstream.h:54
WvTimeoutStream::execute
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
Definition: wvtimeoutstream.cc:15