Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | write_req_t |
Macros | |
#define | DEFAULT_PORT 7000 |
#define | DEFAULT_BACKLOG 128 |
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 | on_close (uv_handle_t *handle) |
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 *server, int status) |
int | main () |
Variables | |
uv_loop_t * | loop |
struct sockaddr_in | addr |
void alloc_buffer | ( | uv_handle_t * | handle, |
size_t | suggested_size, | ||
uv_buf_t * | buf | ||
) |
void echo_read | ( | uv_stream_t * | client, |
ssize_t | nread, | ||
const uv_buf_t * | buf | ||
) |
Definition at line 39 of file main.c.
References echo_write(), free(), malloc(), on_close(), req, uv_buf_init(), uv_close(), uv_err_name(), and uv_write().
void echo_write | ( | uv_write_t * | req, |
int | status | ||
) |
Definition at line 32 of file main.c.
References free_write_req(), req, status, and uv_strerror().
void free_write_req | ( | uv_write_t * | req | ) |
int main | ( | void | ) |
Definition at line 72 of file main.c.
References addr, DEFAULT_BACKLOG, DEFAULT_PORT, loop, on_new_connection(), r, uv_default_loop(), uv_ip4_addr(), uv_listen(), uv_run(), UV_RUN_DEFAULT, uv_strerror(), uv_tcp_bind(), and uv_tcp_init().
void on_close | ( | uv_handle_t * | handle | ) |
Definition at line 28 of file main.c.
References free(), and handle.
Referenced by echo_read(), and on_new_connection().
void on_new_connection | ( | uv_stream_t * | server, |
int | status | ||
) |
Definition at line 55 of file main.c.
References alloc_buffer(), echo_read(), loop, malloc(), on_close(), status, uv_accept(), uv_close(), uv_read_start(), uv_strerror(), and uv_tcp_init().
struct sockaddr_in addr |
Definition at line 9 of file main.c.
Referenced by main(), on_read(), and on_resolved().