2001-10-08 19:24:46 +00:00
|
|
|
#include "CClient.h"
|
|
|
|
#include "CNetworkAddress.h"
|
2001-10-14 18:29:43 +00:00
|
|
|
#include "CThread.h"
|
2001-10-08 19:24:46 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2001-10-14 18:29:43 +00:00
|
|
|
CThread::init();
|
|
|
|
|
2001-10-08 19:24:46 +00:00
|
|
|
if (argc != 2) {
|
|
|
|
fprintf(stderr, "usage: %s <hostname>\n", argv[0]);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
CClient* client = new CClient("ingrid");
|
|
|
|
client->run(CNetworkAddress(argv[1], 50001));
|
|
|
|
}
|
|
|
|
catch (XBase& e) {
|
|
|
|
fprintf(stderr, "failed: %s\n", e.what());
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|