Logo ROOT   6.18/05
Reference Guide
pclient.C File Reference

Detailed Description

Client program to test parallel sockets.

To run this demo do the following:

void pclient(int niter = 100, int bsize = 500000, int nsocks = 5)
{
// Open connection to server
TPSocket *sock = new TPSocket("localhost", 9090, nsocks);
//TPSocket *sock = new TPSocket("pcroot2", 9090, nsocks);
char *buf = new char[bsize];
memset(buf, 65, bsize);
sock->Send(niter, bsize);
// send data to server
for (int i = 0; i < niter; i++) {
int ret = sock->SendRaw(buf, bsize);
if (ret < 0) {
printf("error sending\n");
break;
}
}
delete sock;
delete [] buf;
}
Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
Definition: TPSocket.cxx:554
Int_t Send(const TMessage &mess)
Send a TMessage object.
Definition: TPSocket.cxx:492
Author
Fons Rademakers

Definition in file pclient.C.