#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include "rdd.h"
#include "writer.h"
Go to the source code of this file.
Data Structures | |
struct | _RDD_FD_WRITER |
Typedefs | |
typedef struct _RDD_FD_WRITER | RDD_FD_WRITER |
Functions | |
static int | fd_close (RDD_WRITER *w) |
static int | fd_compare_address (RDD_WRITER *w, struct addrinfo *address, int *result) |
static int | fd_write (RDD_WRITER *w, const unsigned char *buf, unsigned nbyte) |
int | rdd_open_fd_writer (RDD_WRITER **self, int fd) |
Creates a writer that writes to an open file descriptor. | |
Variables | |
static RDD_WRITE_OPS | fd_write_ops |
typedef struct _RDD_FD_WRITER RDD_FD_WRITER |
static int fd_close | ( | RDD_WRITER * | w | ) | [static] |
static int fd_compare_address | ( | RDD_WRITER * | w, | |
struct addrinfo * | address, | |||
int * | result | |||
) | [static] |
static int fd_write | ( | RDD_WRITER * | w, | |
const unsigned char * | buf, | |||
unsigned | nbyte | |||
) | [static] |
Definition at line 87 of file fdwriter.c.
References _RDD_FD_WRITER::fd, RDD_ESPACE, RDD_EWRITE, RDD_OK, and _RDD_WRITER::state.
int rdd_open_fd_writer | ( | RDD_WRITER ** | w, | |
int | fd | |||
) |
Creates a writer that writes to an open file descriptor.
w | output value: the new writer object | |
fd | the open file descriptor that the new writer will write to |
RDD_OK
on success. Definition at line 60 of file fdwriter.c.
References _RDD_FD_WRITER::fd, RDD_BADARG, rdd_new_writer(), RDD_OK, and _RDD_WRITER::state.
RDD_WRITE_OPS fd_write_ops [static] |