27 sock->
Recv(niter, bsize);
29 printf(
"Receive %d buffers of %d bytes over %d parallel sockets...\n",
32 char *buf =
new char[bsize];
39 for (
int i = 0; i < niter; i++) {
40 memset(buf, 0, bsize);
41 int ret = sock->
RecvRaw(buf, bsize);
43 printf(
"error receiving\n");
47 printf(
"received data corrupted\n");
60 printf(
"%d bytes received in %f seconds\n", niter*bsize, rtime);
61 if (rtime > 0) printf(
"%5.2f MB/s\n",
Double_t(niter*bsize/1024/1024)/rtime);
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
void Stop()
Stop the stopwatch.
Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual TSocket * Accept(UChar_t Opt=kSrvNoAuth)
Accept a connection on a parallel server socket.