Client program to test parallel sockets.
To run this demo do the following:
- Open two windows
- Start ROOT in all two windows
- Execute in the first window: .x pserv.C
- Execute in the second window: .x pclient.C If you want to run the pserv.C on a different host, just change "localhost" in the TPSocket ctor below to the desired hostname.
void pclient(
int niter = 100,
int bsize = 500000,
int nsocks = 5)
{
char *buf =
new char[
bsize];
for (int i = 0; i < niter; i++) {
if (ret < 0) {
printf("error sending\n");
break;
}
}
delete sock;
delete [] buf;
}
- Author
- Fons Rademakers
Definition in file pclient.C.