10 buf->len = suggested_size;
16 fprintf(stderr,
"Read error %s\n",
uv_err_name(nread));
23 char *data = (
char*)
malloc(
sizeof(
char) * (nread+1));
25 strncpy(data,
buf->base, nread);
27 fprintf(stderr,
"%s", data);
49 char addr[17] = {
'\0'};
51 fprintf(stderr,
"%s\n",
addr);
65 struct addrinfo hints;
68 hints.ai_protocol = IPPROTO_TCP;
72 fprintf(stderr,
"irc.freenode.net is... ");
76 fprintf(stderr,
"getaddrinfo call error %s\n",
uv_err_name(
r));
static mcore_handle handle
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd socket
RZ_API void Ht_() free(HtName_(Ht) *ht)
int main(int argc, const char **argv)
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static vhangup int status
void on_connect(uv_connect_t *req, int status)
void on_read(uv_stream_t *client, ssize_t nread, const uv_buf_t *buf)
void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
void on_resolved(uv_getaddrinfo_t *resolver, int status, struct addrinfo *res)
UV_EXTERN int uv_tcp_connect(uv_connect_t *req, uv_tcp_t *handle, const struct sockaddr *addr, uv_connect_cb cb)
UV_EXTERN int uv_read_start(uv_stream_t *, uv_alloc_cb alloc_cb, uv_read_cb read_cb)
UV_EXTERN int uv_ip4_name(const struct sockaddr_in *src, char *dst, size_t size)
UV_EXTERN void uv_freeaddrinfo(struct addrinfo *ai)
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
UV_EXTERN const char * uv_err_name(int err)
UV_EXTERN void uv_close(uv_handle_t *handle, uv_close_cb close_cb)
UV_EXTERN int uv_tcp_init(uv_loop_t *, uv_tcp_t *handle)
UV_EXTERN int uv_getaddrinfo(uv_loop_t *loop, uv_getaddrinfo_t *req, uv_getaddrinfo_cb getaddrinfo_cb, const char *node, const char *service, const struct addrinfo *hints)
UV_EXTERN uv_loop_t * uv_default_loop(void)