mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/ (rsock_make_hostent): renamed from sock_make_hostent.
(rsock_addrinfo): renamed from sock_addrinfo. (rsock_getaddrinfo): renamed from sock_getaddrinfo. (rsock_socket): renamed from ruby_socket. (rsock_sock_s_socketpair): renamed from sock_s_socketpair. (rsock_connect): renamed from ruby_connect. * ext/socket/socket.c (sock_listen): make it static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6274c1e72
commit
172d208789
9 changed files with 47 additions and 38 deletions
|
@ -291,7 +291,7 @@ port_str(VALUE port, char *pbuf, size_t len, int *flags_ptr)
|
|||
}
|
||||
|
||||
struct addrinfo*
|
||||
sock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack)
|
||||
rsock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_hack)
|
||||
{
|
||||
struct addrinfo* res = NULL;
|
||||
char *hostp, *portp;
|
||||
|
@ -337,7 +337,7 @@ sock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints, int socktype_ha
|
|||
}
|
||||
|
||||
struct addrinfo*
|
||||
sock_addrinfo(VALUE host, VALUE port, int socktype, int flags)
|
||||
rsock_addrinfo(VALUE host, VALUE port, int socktype, int flags)
|
||||
{
|
||||
struct addrinfo hints;
|
||||
|
||||
|
@ -345,7 +345,7 @@ sock_addrinfo(VALUE host, VALUE port, int socktype, int flags)
|
|||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = socktype;
|
||||
hints.ai_flags = flags;
|
||||
return sock_getaddrinfo(host, port, &hints, 1);
|
||||
return rsock_getaddrinfo(host, port, &hints, 1);
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
@ -583,7 +583,7 @@ call_getaddrinfo(VALUE node, VALUE service,
|
|||
if (!NIL_P(flags)) {
|
||||
hints.ai_flags = NUM2INT(flags);
|
||||
}
|
||||
res = sock_getaddrinfo(node, service, &hints, socktype_hack);
|
||||
res = rsock_getaddrinfo(node, service, &hints, socktype_hack);
|
||||
|
||||
if (res == NULL)
|
||||
rb_raise(rb_eSocket, "host not found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue