src/fdwriter.c File Reference

#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include "rdd.h"
#include "writer.h"

Include dependency graph for fdwriter.c:

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 Documentation

typedef struct _RDD_FD_WRITER RDD_FD_WRITER


Function Documentation

static int fd_close ( RDD_WRITER w  )  [static]

Definition at line 111 of file fdwriter.c.

References _RDD_FD_WRITER::fd, RDD_ECLOSE, and RDD_OK.

static int fd_compare_address ( RDD_WRITER w,
struct addrinfo *  address,
int *  result 
) [static]

Definition at line 126 of file fdwriter.c.

References RDD_BADARG, and RDD_OK.

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.

Parameters:
w output value: the new writer object
fd the open file descriptor that the new writer will write to
Returns:
Returns 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.

Here is the call graph for this function:


Variable Documentation

Initial value:

Definition at line 49 of file fdwriter.c.


Generated on Sun Feb 6 12:36:08 2011 for rdd by  doxygen 1.5.6