Rizin
unix-like reverse engineering framework and cli tools
|
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <uv.h>
Go to the source code of this file.
Classes | |
struct | write_req_t |
Functions | |
void | free_write_req (uv_write_t *req) |
void | alloc_buffer (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) |
void | echo_write (uv_write_t *req, int status) |
void | echo_read (uv_stream_t *client, ssize_t nread, const uv_buf_t *buf) |
void | on_new_connection (uv_stream_t *q, ssize_t nread, const uv_buf_t *buf) |
int | main () |
Variables | |
uv_loop_t * | loop |
uv_pipe_t | queue |
void alloc_buffer | ( | uv_handle_t * | handle, |
size_t | suggested_size, | ||
uv_buf_t * | buf | ||
) |
Definition at line 22 of file worker.c.
References malloc().
Referenced by main(), and on_new_connection().
void echo_read | ( | uv_stream_t * | client, |
ssize_t | nread, | ||
const uv_buf_t * | buf | ||
) |
Definition at line 34 of file worker.c.
References echo_write(), free(), malloc(), NULL, req, uv_buf_init(), uv_close(), uv_err_name(), and uv_write().
Referenced by on_new_connection().
void echo_write | ( | uv_write_t * | req, |
int | status | ||
) |
Definition at line 27 of file worker.c.
References free_write_req(), req, status, and uv_err_name().
Referenced by echo_read().
void free_write_req | ( | uv_write_t * | req | ) |
Definition at line 16 of file worker.c.
References uv_buf_t::base, write_req_t::buf, free(), and req.
Referenced by echo_write().
int main | ( | void | ) |
Definition at line 81 of file worker.c.
References alloc_buffer(), loop, on_new_connection(), queue, uv_default_loop(), uv_pipe_init(), uv_pipe_open(), uv_read_start(), uv_run(), and UV_RUN_DEFAULT.
void on_new_connection | ( | uv_stream_t * | q, |
ssize_t | nread, | ||
const uv_buf_t * | buf | ||
) |
Definition at line 51 of file worker.c.
References alloc_buffer(), assert(), echo_read(), fd, loop, malloc(), NULL, pipe, uv_accept(), uv_close(), uv_err_name(), uv_fileno(), uv_pipe_pending_count(), uv_pipe_pending_type(), uv_read_start(), and uv_tcp_init().
Referenced by main().
uv_loop_t* loop |
Definition at line 8 of file worker.c.
Referenced by main(), and on_new_connection().
uv_pipe_t queue |
Definition at line 9 of file worker.c.
Referenced by main(), rz_th_queue_free(), rz_th_queue_is_empty(), rz_th_queue_is_full(), rz_th_queue_new(), rz_th_queue_pop(), rz_th_queue_push(), rz_th_queue_wait_pop(), uv__async_io(), uv__chld(), uv__inotify_fork(), uv__inotify_read(), uv__stream_flush_write_queue(), uv__udp_finish_close(), uv__udp_run_completed(), uv__udp_sendmsg(), uv__write(), uv__write_callbacks(), and uv_walk().