Ruby  2.0.0p648(2015-12-16revision53162)
Macros | Functions
basicsocket.c File Reference
#include "rubysocket.h"
Include dependency graph for basicsocket.c:

Go to the source code of this file.

Macros

#define rb_sys_fail_path(path)   rb_sys_fail_str(path)
 
#define bsock_getpeereid   rb_f_notimplement
 

Functions

static VALUE bsock_s_for_fd (VALUE klass, VALUE fd)
 
static VALUE bsock_shutdown (int argc, VALUE *argv, VALUE sock)
 
static VALUE bsock_close_read (VALUE sock)
 
static VALUE bsock_close_write (VALUE sock)
 
static VALUE bsock_setsockopt (int argc, VALUE *argv, VALUE sock)
 
static VALUE bsock_getsockopt (VALUE sock, VALUE lev, VALUE optname)
 
static VALUE bsock_getsockname (VALUE sock)
 
static VALUE bsock_getpeername (VALUE sock)
 
static VALUE bsock_local_address (VALUE sock)
 
static VALUE bsock_remote_address (VALUE sock)
 
VALUE rsock_bsock_send (int argc, VALUE *argv, VALUE sock)
 
static VALUE bsock_do_not_reverse_lookup (VALUE sock)
 
static VALUE bsock_do_not_reverse_lookup_set (VALUE sock, VALUE state)
 
static VALUE bsock_recv (int argc, VALUE *argv, VALUE sock)
 
static VALUE bsock_recv_nonblock (int argc, VALUE *argv, VALUE sock)
 
static VALUE bsock_do_not_rev_lookup (void)
 
static VALUE bsock_do_not_rev_lookup_set (VALUE self, VALUE val)
 
void rsock_init_basicsocket (void)
 

Macro Definition Documentation

#define bsock_getpeereid   rb_f_notimplement

Definition at line 457 of file basicsocket.c.

Referenced by rsock_init_basicsocket().

#define rb_sys_fail_path (   path)    rb_sys_fail_str(path)

Function Documentation

static VALUE bsock_close_read ( VALUE  sock)
static
static VALUE bsock_close_write ( VALUE  sock)
static
static VALUE bsock_do_not_rev_lookup ( void  )
static

Definition at line 714 of file basicsocket.c.

References Qfalse, Qtrue, and rsock_do_not_reverse_lookup.

Referenced by rsock_init_basicsocket().

static VALUE bsock_do_not_rev_lookup_set ( VALUE  self,
VALUE  val 
)
static

Definition at line 736 of file basicsocket.c.

References rb_secure(), rsock_do_not_reverse_lookup, RTEST, and val.

Referenced by rsock_init_basicsocket().

static VALUE bsock_do_not_reverse_lookup ( VALUE  sock)
static

Definition at line 593 of file basicsocket.c.

References FMODE_NOREVLOOKUP, GetOpenFile, rb_io_t::mode, Qfalse, and Qtrue.

Referenced by rsock_init_basicsocket().

static VALUE bsock_do_not_reverse_lookup_set ( VALUE  sock,
VALUE  state 
)
static

Definition at line 614 of file basicsocket.c.

References FMODE_NOREVLOOKUP, GetOpenFile, rb_io_t::mode, rb_secure(), and RTEST.

Referenced by rsock_init_basicsocket().

static VALUE bsock_getpeername ( VALUE  sock)
static

Definition at line 388 of file basicsocket.c.

References rb_io_t::fd, GetOpenFile, rb_str_new(), and rb_sys_fail().

Referenced by rsock_init_basicsocket().

static VALUE bsock_getsockname ( VALUE  sock)
static

Definition at line 357 of file basicsocket.c.

References rb_io_t::fd, GetOpenFile, rb_str_new(), and rb_sys_fail().

Referenced by rsock_init_basicsocket().

static VALUE bsock_getsockopt ( VALUE  sock,
VALUE  lev,
VALUE  optname 
)
static
static VALUE bsock_local_address ( VALUE  sock)
static

Definition at line 478 of file basicsocket.c.

References rb_io_t::fd, GetOpenFile, rb_sys_fail(), and rsock_fd_socket_addrinfo().

Referenced by rsock_init_basicsocket().

static VALUE bsock_recv ( int  argc,
VALUE argv,
VALUE  sock 
)
static

Definition at line 649 of file basicsocket.c.

References RECV_RECV, and rsock_s_recvfrom().

Referenced by rsock_init_basicsocket().

static VALUE bsock_recv_nonblock ( int  argc,
VALUE argv,
VALUE  sock 
)
static

Definition at line 700 of file basicsocket.c.

References RECV_RECV, and rsock_s_recvfrom_nonblock().

Referenced by rsock_init_basicsocket().

static VALUE bsock_remote_address ( VALUE  sock)
static

Definition at line 512 of file basicsocket.c.

References rb_io_t::fd, GetOpenFile, rb_sys_fail(), and rsock_fd_socket_addrinfo().

Referenced by rsock_init_basicsocket().

static VALUE bsock_s_for_fd ( VALUE  klass,
VALUE  fd 
)
static

Definition at line 25 of file basicsocket.c.

References GetOpenFile, NUM2INT, rb_obj_alloc(), and rsock_init_sock().

Referenced by rsock_init_basicsocket().

static VALUE bsock_setsockopt ( int  argc,
VALUE argv,
VALUE  sock 
)
static
static VALUE bsock_shutdown ( int  argc,
VALUE argv,
VALUE  sock 
)
static
VALUE rsock_bsock_send ( int  argc,
VALUE argv,
VALUE  sock 
)
void rsock_init_basicsocket ( void  )