Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "rubysocket.h"
Go to the source code of this file.
Data Structures | |
struct | udp_arg |
struct | udp_send_arg |
Functions | |
static VALUE | udp_init (int argc, VALUE *argv, VALUE sock) |
static VALUE | udp_connect_internal (struct udp_arg *arg) |
static VALUE | udp_connect (VALUE sock, VALUE host, VALUE port) |
static VALUE | udp_bind_internal (struct udp_arg *arg) |
static VALUE | udp_bind (VALUE sock, VALUE host, VALUE port) |
static VALUE | udp_send_internal (struct udp_send_arg *arg) |
static VALUE | udp_send (int argc, VALUE *argv, VALUE sock) |
static VALUE | udp_recvfrom_nonblock (VALUE sock, VALUE len, VALUE flg, VALUE str, VALUE ex) |
void | rsock_init_udpsocket (void) |
void rsock_init_udpsocket | ( | void | ) |
Definition at line 227 of file udpsocket.c.
References rb_cIPSocket, rb_cUDPSocket, rb_define_class(), rb_define_method(), rb_define_private_method(), udp_bind(), udp_connect(), udp_init(), udp_recvfrom_nonblock(), and udp_send().
Referenced by rsock_init_socket_init().
Definition at line 130 of file udpsocket.c.
References rb_io_t::fd, udp_arg::fptr, GetOpenFile, INT2FIX, rb_ensure(), udp_arg::res, rsock_addrinfo(), rsock_fd_family(), rsock_freeaddrinfo(), rsock_sys_fail_host_port(), and udp_bind_internal().
Referenced by rsock_init_udpsocket().
Definition at line 100 of file udpsocket.c.
References rb_addrinfo::ai, addrinfo::ai_addr, addrinfo::ai_addrlen, addrinfo::ai_next, rb_io_t::fd, udp_arg::fptr, Qfalse, Qtrue, rb_io_check_closed(), and udp_arg::res.
Referenced by udp_bind().
Definition at line 86 of file udpsocket.c.
References rb_io_t::fd, udp_arg::fptr, GetOpenFile, INT2FIX, rb_ensure(), udp_arg::res, rsock_addrinfo(), rsock_fd_family(), rsock_freeaddrinfo(), rsock_sys_fail_host_port(), and udp_connect_internal().
Referenced by rsock_init_udpsocket().
Definition at line 53 of file udpsocket.c.
References rb_addrinfo::ai, addrinfo::ai_addr, addrinfo::ai_addrlen, addrinfo::ai_next, rb_io_t::fd, udp_arg::fptr, Qfalse, Qtrue, rb_io_check_closed(), udp_arg::res, and rsock_connect().
Referenced by udp_connect().
Definition at line 29 of file udpsocket.c.
References rb_scan_args(), rb_sys_fail(), rsock_family_arg(), rsock_init_sock(), and rsock_socket().
Referenced by rsock_init_udpsocket().
Definition at line 221 of file udpsocket.c.
References RECV_IP, and rsock_s_recvfrom_nonblock().
Referenced by rsock_init_udpsocket().
Definition at line 197 of file udpsocket.c.
References rb_io_t::fd, rsock_send_arg::fd, rsock_send_arg::flags, udp_send_arg::fptr, GetOpenFile, rsock_send_arg::mesg, NUM2INT, rb_ensure(), rb_scan_args(), udp_send_arg::res, rsock_addrinfo(), rsock_bsock_send(), rsock_fd_family(), rsock_freeaddrinfo(), rsock_sys_fail_host_port(), udp_send_arg::sarg, StringValue, and udp_send_internal().
Referenced by rsock_init_udpsocket().
|
static |
Definition at line 150 of file udpsocket.c.
References rb_addrinfo::ai, addrinfo::ai_addr, addrinfo::ai_addrlen, addrinfo::ai_next, BLOCKING_REGION_FD, rb_io_t::fd, rsock_send_arg::fd, udp_arg::fptr, udp_send_arg::fptr, INT2FIX, Qfalse, rb_io_check_closed(), rb_io_wait_writable(), udp_arg::res, udp_send_arg::res, rsock_maybe_fd_writable, rsock_sendto_blocking(), udp_send_arg::sarg, rsock_send_arg::to, and rsock_send_arg::tolen.
Referenced by udp_send().