Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
Go to the documentation of this file.
26 VALUE remote_host, remote_serv;
27 VALUE local_host, local_serv;
29 static ID keyword_ids[2];
34 if (!keyword_ids[0]) {
35 CONST_ID(keyword_ids[0],
"resolv_timeout");
36 CONST_ID(keyword_ids[1],
"connect_timeout");
40 &local_host, &local_serv, &opt);
44 if (kwargs[0] !=
Qundef) { resolv_timeout = kwargs[0]; }
45 if (kwargs[1] !=
Qundef) { connect_timeout = kwargs[1]; }
50 resolv_timeout, connect_timeout);
81 rb_warn(
"TCPSocket.gethostbyname is deprecated; use Addrinfo.getaddrinfo instead.");
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values)
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
void rb_warn(const char *fmt,...)
void rsock_init_tcpsocket(void)
VALUE rsock_make_ipaddr(struct sockaddr *addr, socklen_t addrlen)
VALUE rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, VALUE local_serv, int type, VALUE resolv_timeout, VALUE connect_timeout)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
VALUE rsock_make_hostent(VALUE host, struct rb_addrinfo *addr, VALUE(*ipaddr)(struct sockaddr *, socklen_t))
struct rb_addrinfo * rsock_addrinfo(VALUE host, VALUE port, int family, int socktype, int flags)
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.