|
GNU Radio 3.6.5 C++ API
|
Write stream to an UDP socket. More...
#include <udp_sink.h>
Public Types | |
| typedef boost::shared_ptr < udp_sink > | sptr |
Public Member Functions | |
| virtual int | payload_size ()=0 |
| return the PAYLOAD_SIZE of the socket | |
| virtual void | connect (const std::string &host, int port)=0 |
| Change the connection to a new destination. | |
| virtual void | disconnect ()=0 |
| Send zero-length packet (if eof is requested) then stop sending. | |
Static Public Member Functions | |
| static sptr | make (size_t itemsize, const std::string &host, int port, int payload_size=1472, bool eof=true) |
| UDP Sink Constructor. | |
Write stream to an UDP socket.
| virtual void gr::blocks::udp_sink::connect | ( | const std::string & | host, |
| int | port | ||
| ) | [pure virtual] |
Change the connection to a new destination.
| host | The name or IP address of the receiving host; use NULL or None to break the connection without closing |
| port | Destination port to connect to on receiving host |
Calls disconnect() to terminate any current connection first.
Implemented in gr::blocks::udp_sink_impl.
| virtual void gr::blocks::udp_sink::disconnect | ( | ) | [pure virtual] |
Send zero-length packet (if eof is requested) then stop sending.
Zero-byte packets can be interpreted as EOF by gr_udp_source. Note that disconnect occurs automatically when the sink is destroyed, but not when its top_block stops.
Implemented in gr::blocks::udp_sink_impl.
| static sptr gr::blocks::udp_sink::make | ( | size_t | itemsize, |
| const std::string & | host, | ||
| int | port, | ||
| int | payload_size = 1472, |
||
| bool | eof = true |
||
| ) | [static] |
UDP Sink Constructor.
| itemsize | The size (in bytes) of the item datatype |
| host | The name or IP address of the receiving host; use NULL or None for no connection |
| port | Destination port to connect to on receiving host |
| payload_size | UDP payload size by default set to 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header)) |
| eof | Send zero-length packet on disconnect |
| virtual int gr::blocks::udp_sink::payload_size | ( | ) | [pure virtual] |
return the PAYLOAD_SIZE of the socket
Implemented in gr::blocks::udp_sink_impl.