WvStreams
|
00001 /* 00002 * A WvStream example 00003 * 00004 * Some text about this example... 00005 */ 00006 00007 #include <wvstream.h> 00008 00009 void mycallback(WvStream &s, void *userdata) 00010 { 00011 WvStream *outstream = (WvStream *)userdata; 00012 00013 char *str = s.getline(); 00014 if (str) 00015 outstream->print("You said: %s\n", str); 00016 } 00017 00018 int main() 00019 { 00020 wvcon->setcallback(mycallback, wvcon); 00021 00022 while (wvcon->isok()) 00023 { 00024 if (wvcon->select(-1)) 00025 wvcon->callback(); 00026 } 00027 }