WvStreams
wvstreamex6.cc
1 /*
2  * A WvStream example
3  *
4  * Some text about this example...
5  */
6 
7 #include <wvstream.h>
8 
9 void mycallback(WvStream &s, void *userdata)
10 {
11  WvStream *outstream = (WvStream *)userdata;
12 
13  char *str = s.getline();
14  if (str)
15  outstream->print("You said: %s\n", str);
16 }
17 
18 int main()
19 {
20  wvcon->setcallback(mycallback, wvcon);
21 
22  while (wvcon->isok())
23  {
24  if (wvcon->select(-1))
25  wvcon->callback();
26  }
27 }