GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
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_BLOCKS_SOCKET_PDU_H
12 #define INCLUDED_BLOCKS_SOCKET_PDU_H
13 
14 #include <gnuradio/block.h>
15 #include <gnuradio/blocks/api.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Creates socket interface and translates traffic to PDUs
22  * \ingroup networking_tools_blk
23  */
24 class BLOCKS_API socket_pdu : virtual public block
25 {
26 public:
27  // gr::blocks::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 blocks */
46 } /* namespace gr */
47 
48 #endif /* INCLUDED_BLOCKS_SOCKET_PDU_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:60
Creates socket interface and translates traffic to PDUs.
Definition: socket_pdu.h:25
std::shared_ptr< socket_pdu > sptr
Definition: socket_pdu.h:28
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.
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29