GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
socket_pdu.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 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_SOCKET_PDU_H
12 #define INCLUDED_NETWORK_SOCKET_PDU_H
13 
14 #include <gnuradio/block.h>
15 #include <gnuradio/network/api.h>
16 
17 namespace gr {
18 namespace network {
19 
20 /*!
21  * \brief Creates socket interface and translates traffic to PDUs
22  * \ingroup networking_tools_blk
23  */
24 class NETWORK_API socket_pdu : virtual public block
25 {
26 public:
27  // gr::network::socket_pdu::sptr
28  typedef std::shared_ptr<socket_pdu> sptr;
29 
30  /*!
31  * \brief Construct a SOCKET PDU interface
32  * \param type "TCP_SERVER", "TCP_CLIENT", "UDP_SERVER", or "UDP_CLIENT"
33  * \param addr network address to use
34  * \param port network port to use
35  * \param MTU maximum transmission unit
36  * \param tcp_no_delay TCP No Delay option (set to True to disable Nagle algorithm)
37  */
38  static sptr make(std::string type,
39  std::string addr,
40  std::string port,
41  int MTU = 10000,
42  bool tcp_no_delay = false);
43 };
44 
45 } /* namespace network */
46 } /* namespace gr */
47 
48 #endif /* INCLUDED_NETWORK_SOCKET_PDU_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
Creates socket interface and translates traffic to PDUs.
Definition: socket_pdu.h:25
static sptr make(std::string type, std::string addr, std::string port, int MTU=10000, bool tcp_no_delay=false)
Construct a SOCKET PDU interface.
std::shared_ptr< socket_pdu > sptr
Definition: socket_pdu.h:28
#define NETWORK_API
Definition: gr-network/include/gnuradio/network/api.h:19
GNU Radio logging wrapper.
Definition: basic_block.h:29