Write stream to an TCP socket.
More...
#include <baz_tcp_sink.h>
|
| | ~baz_tcp_sink () |
| bool | connect (const char *host, unsigned short port) |
| | Change the connection to a new destination.
|
| void | disconnect () |
| | Send zero-length packet (if eof is requested) then stop sending.
|
| void | set_status_msgq (gr::msg_queue::sptr queue) |
| int | send_data (int type, const char *data, int length) |
| int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
|
| BAZ_API baz_tcp_sink_sptr | baz_make_tcp_sink (size_t itemsize, const char *host, unsigned short port, bool blocking=true, bool auto_reconnect=false, bool verbose=false) |
Write stream to an TCP socket.
- Parameters
-
| 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 |
◆ baz_tcp_sink()
| baz_tcp_sink::baz_tcp_sink |
( |
size_t | itemsize, |
|
|
const char * | host, |
|
|
unsigned short | port, |
|
|
bool | blocking, |
|
|
bool | auto_reconnect, |
|
|
bool | verbose ) |
|
protected |
TCP Sink Constructor.
- Parameters
-
| 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 |
◆ ~baz_tcp_sink()
| baz_tcp_sink::~baz_tcp_sink |
( |
| ) |
|
◆ _disconnect()
| void baz_tcp_sink::_disconnect |
( |
| ) |
|
|
protected |
◆ allocate()
| void baz_tcp_sink::allocate |
( |
| ) |
|
|
protected |
◆ connect()
| bool baz_tcp_sink::connect |
( |
const char * | host, |
|
|
unsigned short | port ) |
Change the connection to a new destination.
- Parameters
-
| 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.
◆ create()
| bool baz_tcp_sink::create |
( |
| ) |
|
|
protected |
◆ destroy()
| void baz_tcp_sink::destroy |
( |
| ) |
|
|
protected |
◆ disconnect()
| void baz_tcp_sink::disconnect |
( |
| ) |
|
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.
◆ send_data()
| int baz_tcp_sink::send_data |
( |
int | type, |
|
|
const char * | data, |
|
|
int | length ) |
◆ set_status_msgq()
| void baz_tcp_sink::set_status_msgq |
( |
gr::msg_queue::sptr | queue | ) |
|
◆ work()
| int baz_tcp_sink::work |
( |
int | noutput_items, |
|
|
gr_vector_const_void_star & | input_items, |
|
|
gr_vector_void_star & | output_items ) |
◆ baz_make_tcp_sink
| BAZ_API baz_tcp_sink_sptr baz_make_tcp_sink |
( |
size_t | itemsize, |
|
|
const char * | host, |
|
|
unsigned short | port, |
|
|
bool | blocking = true, |
|
|
bool | auto_reconnect = false, |
|
|
bool | verbose = false ) |
|
friend |
The documentation for this class was generated from the following file: