feisty meow concerns codebase
2.140
|
#include <raw_socket.h>
Public Types | |
enum | select_types { SELECTING_JUST_WRITE = 0x1 , SELECTING_JUST_READ = 0x2 } |
Public Member Functions | |
raw_socket () | |
~raw_socket () | |
DEFINE_CLASS_NAME ("raw_socket") | |
int | close (basis::un_int &socket) |
int | ioctl (basis::un_int socket, int request, void *argp) const |
bool | set_non_blocking (basis::un_int socket, bool non_blocking=true) |
bool | set_nagle_algorithm (basis::un_int socket, bool use_nagle=true) |
bool | set_broadcast (basis::un_int socket, bool broadcasting=true) |
bool | set_reuse_address (basis::un_int socket, bool reuse=true) |
bool | set_keep_alive (basis::un_int socket, bool keep_alive=true) |
int | select (basis::un_int socket, int selection_mode, int timeout=0) const |
int | select (basis::int_array &read_sox, basis::int_array &write_sox, int timeout=0) const |
int | analyze_select_result (basis::un_int socket, int mode, fd_set_wrapper &read_list, fd_set_wrapper &write_list, fd_set_wrapper &exceptions) const |
Static Public Member Functions | |
static basis::astring | interest_name (int to_name) |
Definition at line 55 of file raw_socket.h.
Enumerator | |
---|---|
SELECTING_JUST_WRITE | |
SELECTING_JUST_READ |
Definition at line 95 of file raw_socket.h.
sockets::raw_socket::raw_socket | ( | ) |
Definition at line 80 of file raw_socket.cpp.
sockets::raw_socket::~raw_socket | ( | ) |
Definition at line 84 of file raw_socket.cpp.
References basis::WHACK().
int sockets::raw_socket::analyze_select_result | ( | basis::un_int | socket, |
int | mode, | ||
fd_set_wrapper & | read_list, | ||
fd_set_wrapper & | write_list, | ||
fd_set_wrapper & | exceptions | ||
) | const |
Definition at line 295 of file raw_socket.cpp.
References FUNCDEF, LOG, sockets::MULTIPLE_DISCONNECT_CHECKS, SELECTING_JUST_READ, SELECTING_JUST_WRITE, sockets::SI_DISCONNECTED, sockets::SI_ERRONEOUS, sockets::SI_READABLE, and sockets::SI_WRITABLE.
Referenced by select().
int sockets::raw_socket::close | ( | basis::un_int & | socket | ) |
Definition at line 89 of file raw_socket.cpp.
Referenced by sockets::socket_minder::push_receives().
sockets::raw_socket::DEFINE_CLASS_NAME | ( | "raw_socket" | ) |
|
static |
Definition at line 111 of file raw_socket.cpp.
References sockets::combine(), sockets::SI_CONNECTED, sockets::SI_DISCONNECTED, sockets::SI_ERRONEOUS, sockets::SI_READABLE, and sockets::SI_WRITABLE.
Referenced by sockets::socket_data::text_form().
int sockets::raw_socket::ioctl | ( | basis::un_int | socket, |
int | request, | ||
void * | argp | ||
) | const |
Definition at line 123 of file raw_socket.cpp.
Referenced by set_non_blocking().
int sockets::raw_socket::select | ( | basis::int_array & | read_sox, |
basis::int_array & | write_sox, | ||
int | timeout = 0 |
||
) | const |
Definition at line 378 of file raw_socket.cpp.
References analyze_select_result(), FUNCDEF, basis::array< contents >::length(), LOG, NULL_POINTER, basis::array< contents >::reset(), basis::astring::s(), select(), SELECTING_JUST_READ, SELECTING_JUST_WRITE, sockets::SI_ERRONEOUS, SOCK_EFAULT, SOCK_EINPROGRESS, SOCK_EINTR, SOCK_EINVAL, SOCK_ENETDOWN, SOCK_ENOTSOCK, SOCKET_ERROR, sockets::tcpip_stack::tcpip_error_name(), and basis::array< contents >::zap().
int sockets::raw_socket::select | ( | basis::un_int | socket, |
int | selection_mode, | ||
int | timeout = 0 |
||
) | const |
Definition at line 203 of file raw_socket.cpp.
References analyze_select_result(), FUNCDEF, and sockets::SI_ERRONEOUS.
Referenced by sockets::socket_minder::evaluate_interest(), sockets::socket_minder::push_receives(), select(), and sockets::socket_minder::snoozy_select().
bool sockets::raw_socket::set_broadcast | ( | basis::un_int | socket, |
bool | broadcasting = true |
||
) |
Definition at line 167 of file raw_socket.cpp.
References FUNCDEF, LOG, basis::negative(), and OPTYPE.
bool sockets::raw_socket::set_keep_alive | ( | basis::un_int | socket, |
bool | keep_alive = true |
||
) |
Definition at line 191 of file raw_socket.cpp.
References FUNCDEF, LOG, basis::negative(), and OPTYPE.
bool sockets::raw_socket::set_nagle_algorithm | ( | basis::un_int | socket, |
bool | use_nagle = true |
||
) |
Definition at line 155 of file raw_socket.cpp.
References FUNCDEF, LOG, basis::negative(), and OPTYPE.
bool sockets::raw_socket::set_non_blocking | ( | basis::un_int | socket, |
bool | non_blocking = true |
||
) |
Definition at line 139 of file raw_socket.cpp.
References FUNCDEF, ioctl(), LOG, basis::negative(), and sockets::NON_BLOCKING.
Referenced by sockets::socket_minder::add_socket_data().
bool sockets::raw_socket::set_reuse_address | ( | basis::un_int | socket, |
bool | reuse = true |
||
) |
Definition at line 179 of file raw_socket.cpp.
References FUNCDEF, LOG, basis::negative(), and OPTYPE.