GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
tcp_sink.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2020 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_NETWORK_TCP_SINK_H
12
#define INCLUDED_NETWORK_TCP_SINK_H
13
14
#include <
gnuradio/network/api.h
>
15
#include <
gnuradio/sync_block.h
>
16
17
#define TCPSINKMODE_CLIENT 1
18
#define TCPSINKMODE_SERVER 2
19
20
namespace
gr
{
21
namespace
network {
22
23
/*!
24
* \brief This block provides a TCP Sink block that supports
25
* both client and server modes.
26
* \ingroup networking_tools
27
*
28
* \details
29
* This block provides a TCP sink that supports both listening for
30
* inbound connections (server mode) and connecting to other applications
31
* (client mode) in order to send data from a GNU Radio flowgraph.
32
* The block supports both IPv4 and IPv6 with appropriate code determined
33
* by the address used. In server mode, if a client disconnects, the
34
* flowgraph will continue to execute. If/when a new client connection
35
* is established, data will then pick up with the current stream for
36
* transmission to the new client.
37
*/
38
class
NETWORK_API
tcp_sink
:
virtual
public
gr::sync_block
39
{
40
public
:
41
typedef
std::shared_ptr<tcp_sink>
sptr
;
42
43
/*!
44
* Build a tcp_sink block.
45
*/
46
static
sptr
47
make(
size_t
itemsize
,
size_t
veclen,
const
std::string& host,
int
port,
int
sinkmode);
48
};
49
50
}
// namespace network
51
}
// namespace gr
52
53
#endif
/* INCLUDED_NETWORK_TCP_SINK_H */
gr::blocks::pdu::itemsize
BLOCKS_API size_t itemsize(vector_type type)
gr::network::tcp_sink
This block provides a TCP Sink block that supports both client and server modes.
Definition:
tcp_sink.h:38
gr::sync_block
synchronous 1:1 input to output with history
Definition:
sync_block.h:25
sync_block.h
api.h
NETWORK_API
#define NETWORK_API
Definition:
gr-network/include/gnuradio/network/api.h:19
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr::network::tcp_sink::sptr
std::shared_ptr< tcp_sink > sptr
Definition:
tcp_sink.h:41
gr-network
include
gnuradio
network
tcp_sink.h
Generated by
1.8.17