summaryrefslogtreecommitdiff
path: root/ext/socket/udpsocket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:30:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:30:41 +0000
commitc49f05dd792049e45608c1132be912695f4909e4 (patch)
tree26a732bca166c49d2fd5ce50d4aac36389375ca5 /ext/socket/udpsocket.c
parentfaabbf230a026405feebf75a7cd9f4c0d9379d60 (diff)
* ext/socket: add rsock_prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/udpsocket.c')
-rw-r--r--ext/socket/udpsocket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index 77fde98..e238353 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -32,14 +32,14 @@ udp_init(int argc, VALUE *argv, VALUE sock)
rb_secure(3);
if (rb_scan_args(argc, argv, "01", &arg) == 1) {
- family = family_arg(arg);
+ family = rsock_family_arg(arg);
}
fd = ruby_socket(family, SOCK_DGRAM, 0);
if (fd < 0) {
rb_sys_fail("socket(2) - udp");
}
- return init_sock(sock, fd);
+ return rsock_init_sock(sock, fd);
}
struct udp_arg
@@ -157,10 +157,10 @@ udp_send(int argc, VALUE *argv, VALUE sock)
rb_io_t *fptr;
int n;
struct addrinfo *res0, *res;
- struct send_arg arg;
+ struct rsock_send_arg arg;
if (argc == 2 || argc == 3) {
- return bsock_send(argc, argv, sock);
+ return rsock_bsock_send(argc, argv, sock);
}
rb_secure(4);
rb_scan_args(argc, argv, "4", &arg.mesg, &flags, &host, &port);
@@ -175,7 +175,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
arg.to = res->ai_addr;
arg.tolen = res->ai_addrlen;
rb_thread_fd_writable(arg.fd);
- n = (int)BLOCKING_REGION(sendto_blocking, &arg);
+ n = (int)BLOCKING_REGION(rsock_sendto_blocking, &arg);
if (n >= 0) {
freeaddrinfo(res0);
return INT2FIX(n);
@@ -233,7 +233,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
static VALUE
udp_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock)
{
- return s_recvfrom_nonblock(sock, argc, argv, RECV_IP);
+ return rsock_s_recvfrom_nonblock(sock, argc, argv, RECV_IP);
}
/*