2 #include "wvistreamlist.h"
3 #include "wvsyncstring.h"
4 #include "wvsyncarbiter.h"
5 #include "wvsyncprotocol.h"
6 #include "uniconfroot.h"
11 WvLog
log("Test Client", WvLog::Info
);
12 UniConfRoot
root("ini:/tmp/wvsync_client.ini");
14 WvTCPConn
tcp((WvIPPortAddr
)"127.0.0.1:4321");
16 WvSyncProtocol
proto(&tcp
, &log
, wsa
, root
, false);
18 WvSyncString
*obj
= new
19 WvSyncString("ashley", "I have but a fleeting memory of thee", 10);
20 // while (!proto.want_more())
22 // log(WvLog::Info, "More, more, give me more\n");
25 proto
.do_chdir("foo");
26 // while (!proto.want_more())
30 WvIStreamList::globallist
.append(&proto
, false);
32 while (!WvIStreamList::globallist
.isempty())
33 WvIStreamList::globallist
.runonce();
35 while (proto.isok() && tcp.isok())
37 log(WvLog::Debug4, "select\n");
43 wvcon
->print("CHDIR foo\n");
46 wvcon
->print("IHAVE new none 1192347202 i_am_some_meta ashley\n");
49 WvSyncString
ash("ashley", "She is out there somewhere,"
50 " but I missed my chance.\n");
54 size_t size
= buf
.used();
58 // log("Read %s bytes\n", wvcon->read(sig, 24));
59 // wvcon->print("SIG %s ashley\n", size);
60 // wvcon->flush(5000);
62 // log("Wrote %s bytes\n", wvcon->write(buf, size));
64 wvcon
->autoforward(*wvcon
);