Belle II Software
development
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
if
(argc < 3) {
21
printf(
"Wrong number of arguments\n"
);
22
return
1;
23
}
24
SocketSend
sock(argv[1], (
unsigned
short
)atoi(argv[2]));
25
26
sleep(10);
27
28
int
count = 0;
29
for
(;;) {
30
int
sendbuf = 4;
31
int
is = write(sock.sock(), &sendbuf, 4);
32
printf(
"data sent (%d), ret=%d\n"
, count++, is);
33
sleep(1);
34
}
35
return
0;
36
}
Belle2::SocketSend
Definition:
SocketLib.h:78
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
std
STL namespace.
daq
dataflow
tools
sm_client.cc
Generated on Tue Nov 12 2024 02:34:52 for Belle II Software by
1.9.6