baz_tcp_sink Class Reference

Write stream to an TCP socket. More...

`#include <baz_tcp_sink.h>`

Inheritance diagram for baz_tcp_sink:
[legend]

## Public Member Functions

| ~baz_tcp_sink ()
bool | connect (const char *host, unsigned short port)
| Change the connection to a new destination. More...
void | disconnect ()
| Send zero-length packet (if eof is requested) then stop sending. More...
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)

## Protected Member Functions

| baz_tcp_sink (size_t itemsize, const char *host, unsigned short port, bool blocking, bool auto_reconnect, bool verbose)
| TCP Sink Constructor. More...
bool | create ()
void | allocate ()
void | destroy ()
void | _disconnect ()

## Friends

BAZ_API baz_tcp_sink_sptr | baz_make_tcp_sink (size_t itemsize, const char *host, unsigned short port, bool blocking, bool auto_reconnect, bool verbose)

## Detailed Description

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

## Constructor & Destructor Documentation

## 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 | ( |  | ) |

## Member Function Documentation

## _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
| ) |  |

## Friends And Related Function Documentation

## 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,
|  | bool | auto_reconnect,
|  | bool | verbose
| ) |  |

friend

The documentation for this class was generated from the following file:

- baz_tcp_sink.h