tcpsocket.c File Reference
`#include "rubysocket.h"`

Go to the source code of this file.

## Functions

static VALUE | tcp_init (int argc, VALUE *argv, VALUE sock)
static VALUE | tcp_sockaddr (struct sockaddr *addr, size_t len)
static VALUE | tcp_s_gethostbyname (VALUE obj, VALUE host)
void | rsock_init_tcpsocket (void)

## Function Documentation

void rsock_init_tcpsocket | ( | void |  | ) |

Definition at line 59 of file tcpsocket.c.

References rb_cIPSocket, rb_cTCPSocket, rb_define_class(), rb_define_method(), rb_define_singleton_method(), tcp_init(), and tcp_s_gethostbyname().

Referenced by rsock_init_socket_init().

static VALUE tcp_init | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | sock
| ) |  |

static

Definition at line 22 of file tcpsocket.c.

References INET_CLIENT, rb_scan_args(), and rsock_init_inetsock().

Referenced by rsock_init_tcpsocket().

static VALUE tcp_s_gethostbyname | ( | VALUE | obj,
|  | VALUE | host
| ) |  |

static

Definition at line 51 of file tcpsocket.c.

References AI_CANONNAME, Qnil, rb_secure(), rsock_addrinfo(), rsock_make_hostent(), and tcp_sockaddr().

Referenced by rsock_init_tcpsocket().

static VALUE tcp_sockaddr | ( | struct sockaddr * | addr,
|  | size_t | len
| ) |  |

static

Definition at line 35 of file tcpsocket.c.

References rsock_make_ipaddr().

Referenced by tcp_s_gethostbyname().