fstrm  0.4.0
Frame Streams implementation in C
fstrm_unix_writer

Detailed Description

fstrm_unix_writer is an interface for opening an fstrm_writer object that is backed by I/O on a stream-oriented (SOCK_STREAM) Unix socket.

Functions

struct fstrm_unix_writer_options * fstrm_unix_writer_options_init (void)
 Initialize an fstrm_unix_writer_options object, which is needed to configure the socket path to be opened by the writer. More...
 
void fstrm_unix_writer_options_destroy (struct fstrm_unix_writer_options **uwopt)
 Destroy an fstrm_unix_writer_options object. More...
 
void fstrm_unix_writer_options_set_socket_path (struct fstrm_unix_writer_options *uwopt, const char *socket_path)
 Set the socket_path option. More...
 
struct fstrm_writer * fstrm_unix_writer_init (const struct fstrm_unix_writer_options *uwopt, const struct fstrm_writer_options *wopt)
 Initialize the fstrm_writer object. More...
 

Function Documentation

◆ fstrm_unix_writer_options_init()

struct fstrm_unix_writer_options* fstrm_unix_writer_options_init ( void  )

Initialize an fstrm_unix_writer_options object, which is needed to configure the socket path to be opened by the writer.

Returns
fstrm_unix_writer_options object.

◆ fstrm_unix_writer_options_destroy()

void fstrm_unix_writer_options_destroy ( struct fstrm_unix_writer_options **  uwopt)

Destroy an fstrm_unix_writer_options object.

Parameters
uwoptPointer to fstrm_unix_writer_options object.

◆ fstrm_unix_writer_options_set_socket_path()

void fstrm_unix_writer_options_set_socket_path ( struct fstrm_unix_writer_options *  uwopt,
const char *  socket_path 
)

Set the socket_path option.

This is a filesystem path that will be connected to as an AF_UNIX socket.

Parameters
uwoptfstrm_unix_writer_options object.
socket_pathThe filesystem path to the AF_UNIX socket.

◆ fstrm_unix_writer_init()

struct fstrm_writer* fstrm_unix_writer_init ( const struct fstrm_unix_writer_options *  uwopt,
const struct fstrm_writer_options *  wopt 
)

Initialize the fstrm_writer object.

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

Parameters
uwoptfstrm_unix_writer_options object. Must be non-NULL, and have the socket_path option set.
woptfstrm_writer_options object. May be NULL, in which chase default values will be used.
Returns
fstrm_writer object.
Return values
NULLon failure.