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