WvStreams
wvstreamex7.cc
1/*
2 * A WvStream example.
3 *
4 * Some text about this example...
5 */
6
7#include <wvstream.h>
8
9int main()
10{
11 int nothing_count = 0;
12 wvcon->autoforward(*wvcon);
13
14 while (wvcon->isok())
15 {
16 if (wvcon->select(1000))
17 {
18 nothing_count = 0;
19 wvcon->callback();
20 }
21 else
22 {
23 nothing_count++;
24 wvcon->print("[TICK]");
25 if (nothing_count == 10)
26 {
27 wvcon->print("[TIMEOUT]\n");
28 break;
29 }
30 }
31 }
32}