Go to the source code of this file.
Functions | |
void | r_io_shutdown_all (struct ccnr_handle *h) |
Shutdown all open fds. | |
void | r_io_prepare_poll_fds (struct ccnr_handle *h) |
Set up the array of fd descriptors for the poll(2) call. | |
void | r_dispatch_process_internal_client_buffer (struct ccnr_handle *h) |
void | r_io_send (struct ccnr_handle *h, struct fdholder *fdholder, const void *data, size_t size, off_t *offsetp) |
Send data to the fdholder. | |
int | r_io_destroy_face (struct ccnr_handle *h, unsigned filedesc) |
Destroys the fdholder identified by filedesc. | |
int | r_io_open_repo_data_file (struct ccnr_handle *h, const char *name, int output) |
int | r_io_repo_data_file_fd (struct ccnr_handle *h, unsigned repofile, int output) |
void | r_io_shutdown_client_fd (struct ccnr_handle *h, int fd) |
int | r_io_accept_connection (struct ccnr_handle *h, int listener_fd) |
Accept an incoming DGRAM_STREAM connection, creating a new fdholder. | |
struct fdholder * | r_io_record_fd (struct ccnr_handle *h, int fd, void *who, socklen_t wholen, int setflags) |
Make a new fdholder corresponding to the fd. | |
void | r_io_register_new_face (struct ccnr_handle *h, struct fdholder *fdholder) |
Called when a fdholder is first created, and (perhaps) a second time in the case that a fdholder transitions from the undecided state. | |
int | r_io_enroll_face (struct ccnr_handle *h, struct fdholder *fdholder) |
Assigns the filedesc for a nacent fdholder, calls r_io_register_new_face() if successful. | |
struct fdholder * | ccnr_r_io_fdholder_from_fd (struct ccnr_handle *h, unsigned filedesc) |
Looks up a fdholder based on its filedesc. | |
struct fdholder * | r_io_fdholder_from_fd (struct ccnr_handle *h, unsigned filedesc) |
Looks up a fdholder based on its filedesc (private). |
Definition in file ccnr_io.h.
struct fdholder* ccnr_r_io_fdholder_from_fd | ( | struct ccnr_handle * | h, | |
unsigned | filedesc | |||
) | [read] |
Looks up a fdholder based on its filedesc.
Definition at line 86 of file ccnr_io.c.
Referenced by ccnr_collect_stats(), and post_face_notice().
void r_dispatch_process_internal_client_buffer | ( | struct ccnr_handle * | h | ) |
int r_io_accept_connection | ( | struct ccnr_handle * | h, | |
int | listener_fd | |||
) |
Accept an incoming DGRAM_STREAM connection, creating a new fdholder.
Definition at line 250 of file ccnr_io.c.
Referenced by r_dispatch_process_input().
int r_io_destroy_face | ( | struct ccnr_handle * | h, | |
unsigned | filedesc | |||
) |
Destroys the fdholder identified by filedesc.
Definition at line 369 of file ccnr_io.c.
Referenced by ccnr_stats_handle_http_connection().
int r_io_enroll_face | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder | |||
) |
Assigns the filedesc for a nacent fdholder, calls r_io_register_new_face() if successful.
Definition at line 96 of file ccnr_io.c.
Referenced by r_init_create(), and r_io_record_fd().
struct fdholder* r_io_fdholder_from_fd | ( | struct ccnr_handle * | h, | |
unsigned | filedesc | |||
) | [read] |
Looks up a fdholder based on its filedesc (private).
Definition at line 70 of file ccnr_io.c.
Referenced by ccnr_r_io_fdholder_from_fd(), content_sender(), r_dispatch_process_input(), r_init_map_and_process_file(), r_io_prepare_poll_fds(), r_io_shutdown_all(), r_io_shutdown_client_fd(), r_link_do_deferred_write(), r_match_consume_interest(), r_match_consume_matching_interests(), r_proto_answer_req(), r_proto_expect_content(), r_store_commit_content(), r_store_reindexing(), r_store_send_content(), r_sync_local_store(), and r_sync_upcall_store().
int r_io_open_repo_data_file | ( | struct ccnr_handle * | h, | |
const char * | name, | |||
int | output | |||
) |
Definition at line 273 of file ccnr_io.c.
Referenced by r_init_map_and_process_file(), r_io_repo_data_file_fd(), and r_store_init().
void r_io_prepare_poll_fds | ( | struct ccnr_handle * | h | ) |
Set up the array of fd descriptors for the poll(2) call.
Definition at line 506 of file ccnr_io.c.
Referenced by r_dispatch_run().
struct fdholder* r_io_record_fd | ( | struct ccnr_handle * | h, | |
int | fd, | |||
void * | who, | |||
socklen_t | wholen, | |||
int | setflags | |||
) | [read] |
Make a new fdholder corresponding to the fd.
Definition at line 214 of file ccnr_io.c.
Referenced by r_init_create(), r_io_accept_connection(), r_io_open_repo_data_file(), r_net_listen_on_address(), and r_net_listen_on_wildcards().
void r_io_register_new_face | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder | |||
) |
Called when a fdholder is first created, and (perhaps) a second time in the case that a fdholder transitions from the undecided state.
Definition at line 380 of file ccnr_io.c.
Referenced by process_input_message(), and r_io_enroll_face().
int r_io_repo_data_file_fd | ( | struct ccnr_handle * | h, | |
unsigned | repofile, | |||
int | output | |||
) |
void r_io_send | ( | struct ccnr_handle * | h, | |
struct fdholder * | fdholder, | |||
const void * | data, | |||
size_t | size, | |||
off_t * | offsetp | |||
) |
Send data to the fdholder.
No direct error result is provided; the fdholder state is updated as needed.
Definition at line 425 of file ccnr_io.c.
Referenced by ccnr_stats_handle_http_connection(), r_io_send(), r_link_stuff_and_send(), and send_http_response().
void r_io_shutdown_all | ( | struct ccnr_handle * | h | ) |
void r_io_shutdown_client_fd | ( | struct ccnr_handle * | h, | |
int | fd | |||
) |
Definition at line 325 of file ccnr_io.c.
Referenced by r_dispatch_process_input(), r_dispatch_run(), r_init_map_and_process_file(), r_io_destroy_face(), r_io_shutdown_all(), and r_link_do_deferred_write().