Belle II Software  release-05-01-25
sm_client.cc
1 //+
2 // Test client
3 //-
4 
5 #include "daq/dataflow/SocketLib.h"
6 
7 #include <cstdio>
8 #include <cstdlib>
9 #include <unistd.h>
10 
11 using namespace std;
12 using namespace Belle2;
13 
14 int main(int argc, char** argv)
15 {
16  SocketSend sock(argv[1], (unsigned short)atoi(argv[2]));
17 
18  sleep(10);
19 
20  int count = 0;
21  for (;;) {
22  int sendbuf = 4;
23  int is = write(sock.sock(), &sendbuf, 4);
24  printf("data sent (%d), ret=%d\n", count++, is);
25  sleep(1);
26  }
27 }
main
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:77
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SocketSend
Definition: SocketLib.h:84