1 #include "wvsyncfilelister.h"
2 #include "wvsyncprotocol.h"
4 #include "wvsyncarbiter.h"
5 #include "uniconfroot.h"
8 void gogo(WvTCPConn
*tcp
, WvStringParm cfgpath
,
9 WvStringParm dirpath
, bool server
)
11 WvLog
log("FileListerTests", WvLog::Info
);
12 UniConfRoot
cfg(cfgpath
);
16 WvSyncProtocol
proto(tcp
, &log
, wsa
, cfg
, server
);
17 WvSyncFileLister
fl(proto
, dirpath
, cfg
);
18 proto
.set_lister(&fl
);
23 int main(int argc
, char *argv
[])
25 if (argv
[1] == WvString("server"))
27 WvTCPListener
l(4322);
30 gogo(l
.accept(), argv
[2], argv
[3], true);
34 wvcon
->print("Good day to you, my dear friend\n");
39 WvTCPConn
*tcp
= new WvTCPConn((WvIPPortAddr
)"127.0.0.1:4322");
40 gogo(tcp
, argv
[2], argv
[3], false);