fstrm  0.4.0
Frame Streams implementation in C
fstrm_tcp_writer

Detailed Description

fstrm_tcp_writer is an interface for opening an fstrm_writer object that is backed by I/O on a TCP socket.

Functions

struct fstrm_tcp_writer_options * fstrm_tcp_writer_options_init (void)
 Initialize an fstrm_tcp_writer_options object, which is needed to configure the socket address and socket port to be opened by the writer. More...
 
void fstrm_tcp_writer_options_destroy (struct fstrm_tcp_writer_options **twopt)
 Destroy an fstrm_tcp_writer_options object. More...
 
void fstrm_tcp_writer_options_set_socket_address (struct fstrm_tcp_writer_options *twopt, const char *socket_address)
 Set the socket_address option. More...
 
void fstrm_tcp_writer_options_set_socket_port (struct fstrm_tcp_writer_options *twopt, const char *socket_port)
 Set the socket_port option. More...
 
struct fstrm_writer * fstrm_tcp_writer_init (const struct fstrm_tcp_writer_options *twopt, const struct fstrm_writer_options *wopt)
 Initialize the fstrm_writer object. More...
 

Function Documentation

◆ fstrm_tcp_writer_options_init()

struct fstrm_tcp_writer_options* fstrm_tcp_writer_options_init ( void  )

Initialize an fstrm_tcp_writer_options object, which is needed to configure the socket address and socket port to be opened by the writer.

Returns
fstrm_tcp_writer_options object.

◆ fstrm_tcp_writer_options_destroy()

void fstrm_tcp_writer_options_destroy ( struct fstrm_tcp_writer_options **  twopt)

Destroy an fstrm_tcp_writer_options object.

Parameters
twoptPointer to fstrm_tcp_writer_options object.

◆ fstrm_tcp_writer_options_set_socket_address()

void fstrm_tcp_writer_options_set_socket_address ( struct fstrm_tcp_writer_options *  twopt,
const char *  socket_address 
)

Set the socket_address option.

This is the IPv4 or IPv6 address in presentation format to be connected by the TCP socket.

Parameters
twoptfstrm_tcp_writer_options object.
socket_addressThe socket address.

◆ fstrm_tcp_writer_options_set_socket_port()

void fstrm_tcp_writer_options_set_socket_port ( struct fstrm_tcp_writer_options *  twopt,
const char *  socket_port 
)

Set the socket_port option.

This is the TCP port number to be connected by the TCP socket.

Parameters
twoptfstrm_tcp_writer_options object.
socket_portThe TCP socket port number provided as a character string. (When converted, the maximum allowed unsigned integer is 65535.)

◆ fstrm_tcp_writer_init()

struct fstrm_writer* fstrm_tcp_writer_init ( const struct fstrm_tcp_writer_options *  twopt,
const struct fstrm_writer_options *  wopt 
)

Initialize the fstrm_writer object.

Note that the TCP socket will not actually be opened until a subsequent call to fstrm_writer_open().

Parameters
twoptfstrm_tcp_writer_options object. Must be non-NULL, and have the socket_address and socket_port options set.
woptfstrm_writer_options object. May be NULL, in which chase default values will be used.
Returns
fstrm_writer object.
Return values
NULLon failure.