summaryrefslogtreecommitdiff
path: root/ext/socket/udpsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:48:22 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:48:22 +0000
commit172d20878955c7b8eca9ebc782dfa7e91340dc8c (patch)
tree66243818fc9ea9d53404f371b088c304e8e1bb21 /ext/socket/udpsocket.c
parenta6274c1e72689ad0425560a637f96beeb9e93ad2 (diff)
* 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
Diffstat (limited to 'ext/socket/udpsocket.c')
-rw-r--r--ext/socket/udpsocket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index e238353..2463c83 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -34,7 +34,7 @@ udp_init(int argc, VALUE *argv, VALUE sock)
if (rb_scan_args(argc, argv, "01", &arg) == 1) {
family = rsock_family_arg(arg);
}
- fd = ruby_socket(family, SOCK_DGRAM, 0);
+ fd = rsock_socket(family, SOCK_DGRAM, 0);
if (fd < 0) {
rb_sys_fail("socket(2) - udp");
}
@@ -55,7 +55,7 @@ udp_connect_internal(struct udp_arg *arg)
struct addrinfo *res;
for (res = arg->res; res; res = res->ai_next) {
- if (ruby_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
+ if (rsock_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
return Qtrue;
}
}
@@ -86,7 +86,7 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
VALUE ret;
rb_secure(3);
- arg.res = sock_addrinfo(host, port, SOCK_DGRAM, 0);
+ arg.res = rsock_addrinfo(host, port, SOCK_DGRAM, 0);
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
@@ -114,7 +114,7 @@ udp_bind(VALUE sock, VALUE host, VALUE port)
struct addrinfo *res0, *res;
rb_secure(3);
- res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
+ res0 = rsock_addrinfo(host, port, SOCK_DGRAM, 0);
GetOpenFile(sock, fptr);
for (res = res0; res; res = res->ai_next) {
if (bind(fptr->fd, res->ai_addr, res->ai_addrlen) < 0) {
@@ -166,7 +166,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
rb_scan_args(argc, argv, "4", &arg.mesg, &flags, &host, &port);
StringValue(arg.mesg);
- res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
+ res0 = rsock_addrinfo(host, port, SOCK_DGRAM, 0);
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
arg.flags = NUM2INT(flags);