Belle II Software  release-06-01-15
sm_client.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include "daq/dataflow/SocketLib.h"
10 
11 #include <cstdio>
12 #include <cstdlib>
13 #include <unistd.h>
14 
15 using namespace std;
16 using namespace Belle2;
17 
18 int main(int argc, char** argv)
19 {
20  SocketSend sock(argv[1], (unsigned short)atoi(argv[2]));
21 
22  sleep(10);
23 
24  int count = 0;
25  for (;;) {
26  int sendbuf = 4;
27  int is = write(sock.sock(), &sendbuf, 4);
28  printf("data sent (%d), ret=%d\n", count++, is);
29  sleep(1);
30  }
31 }
Abstract base class for different kinds of events.
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:75