mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-25 12:06:26 +03:00
b3291bc2b5
wait forever). also fixed early return from sleep due to signal. now forcing client to initialize CThread to ensure global mutex gets initialized before threads are used.
25 lines
426 B
C++
25 lines
426 B
C++
#include "CClient.h"
|
|
#include "CNetworkAddress.h"
|
|
#include "CThread.h"
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
CThread::init();
|
|
|
|
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;
|
|
}
|