Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions
socket.c File Reference
#include "rubysocket.h"

Go to the source code of this file.

Macros

#define rsock_sock_s_socketpair   rb_f_notimplement
 
#define sock_gethostname   rb_f_notimplement
 
#define socket_s_ip_address_list   rb_f_notimplement
 

Functions

void rsock_sys_fail_host_port (const char *mesg, VALUE host, VALUE port)
 
void rsock_syserr_fail_host_port (int err, const char *mesg, VALUE host, VALUE port)
 
void rsock_sys_fail_path (const char *mesg, VALUE path)
 
void rsock_syserr_fail_path (int err, const char *mesg, VALUE path)
 
void rsock_sys_fail_sockaddr (const char *mesg, struct sockaddr *addr, socklen_t len)
 
void rsock_syserr_fail_sockaddr (int err, const char *mesg, struct sockaddr *addr, socklen_t len)
 
void rsock_sys_fail_raddrinfo (const char *mesg, VALUE rai)
 
void rsock_syserr_fail_raddrinfo (int err, const char *mesg, VALUE rai)
 
void rsock_sys_fail_raddrinfo_or_sockaddr (const char *mesg, VALUE addr, VALUE rai)
 
void rsock_syserr_fail_raddrinfo_or_sockaddr (int err, const char *mesg, VALUE addr, VALUE rai)
 
VALUE rsock_sock_listen (VALUE sock, VALUE log)
 
void Init_socket (void)
 

Macro Definition Documentation

◆ rsock_sock_s_socketpair

#define rsock_sock_s_socketpair   rb_f_notimplement

Definition at line 308 of file socket.c.

◆ sock_gethostname

#define sock_gethostname   rb_f_notimplement

Definition at line 932 of file socket.c.

◆ socket_s_ip_address_list

#define socket_s_ip_address_list   rb_f_notimplement

Definition at line 1929 of file socket.c.

Function Documentation

◆ Init_socket()

void Init_socket ( void  )

◆ rsock_sock_listen()

VALUE rsock_sock_listen ( VALUE  sock,
VALUE  log 
)

Definition at line 644 of file socket.c.

References rb_io_t::fd, GetOpenFile, INT2FIX, NUM2INT, and rb_sys_fail().

Referenced by rsock_init_unixserver().

◆ rsock_sys_fail_host_port()

void rsock_sys_fail_host_port ( const char *  mesg,
VALUE  host,
VALUE  port 
)

Definition at line 18 of file socket.c.

References errno, and rsock_syserr_fail_host_port().

◆ rsock_sys_fail_path()

void rsock_sys_fail_path ( const char *  mesg,
VALUE  path 
)

Definition at line 35 of file socket.c.

References errno, and rsock_syserr_fail_path().

◆ rsock_sys_fail_raddrinfo()

void rsock_sys_fail_raddrinfo ( const char *  mesg,
VALUE  rai 
)

Definition at line 71 of file socket.c.

References errno, and rsock_syserr_fail_raddrinfo().

◆ rsock_sys_fail_raddrinfo_or_sockaddr()

void rsock_sys_fail_raddrinfo_or_sockaddr ( const char *  mesg,
VALUE  addr,
VALUE  rai 
)

Definition at line 88 of file socket.c.

References errno, and rsock_syserr_fail_raddrinfo_or_sockaddr().

◆ rsock_sys_fail_sockaddr()

void rsock_sys_fail_sockaddr ( const char *  mesg,
struct sockaddr *  addr,
socklen_t  len 
)

Definition at line 55 of file socket.c.

References errno, and rsock_syserr_fail_sockaddr().

◆ rsock_syserr_fail_host_port()

void rsock_syserr_fail_host_port ( int  err,
const char *  mesg,
VALUE  host,
VALUE  port 
)

Definition at line 24 of file socket.c.

References PRIsVALUE, rb_sprintf(), and rb_syserr_fail_str().

Referenced by rsock_sys_fail_host_port().

◆ rsock_syserr_fail_path()

void rsock_syserr_fail_path ( int  err,
const char *  mesg,
VALUE  path 
)

Definition at line 41 of file socket.c.

References PRIsVALUE, rb_sprintf(), rb_syserr_fail(), rb_syserr_fail_str(), RB_TYPE_P, and T_STRING.

Referenced by rsock_sys_fail_path().

◆ rsock_syserr_fail_raddrinfo()

void rsock_syserr_fail_raddrinfo ( int  err,
const char *  mesg,
VALUE  rai 
)

◆ rsock_syserr_fail_raddrinfo_or_sockaddr()

void rsock_syserr_fail_raddrinfo_or_sockaddr ( int  err,
const char *  mesg,
VALUE  addr,
VALUE  rai 
)

◆ rsock_syserr_fail_sockaddr()

void rsock_syserr_fail_sockaddr ( int  err,
const char *  mesg,
struct sockaddr *  addr,
socklen_t  len 
)