raw_socket Class Reference

#include <raw_socket.h>

Inheritance diagram for raw_socket:

Inheritance graph
[legend]
Collaboration diagram for raw_socket:

Collaboration graph
[legend]
List of all members.

Public Types

enum  select_types { SELECTING_JUST_WRITE = 0x1, SELECTING_JUST_READ = 0x2 }

Public Member Functions

 raw_socket ()
 ~raw_socket ()
 IMPLEMENT_CLASS_NAME ("raw_socket")
int close (u_int &socket)
int ioctl (u_int socket, int request, void *argp) const
bool set_non_blocking (u_int socket, bool non_blocking=true)
bool set_nagle_algorithm (u_int socket, bool use_nagle=true)
bool set_broadcast (u_int socket, bool broadcasting=true)
bool set_reuse_address (u_int socket, bool reuse=true)
bool set_keep_alive (u_int socket, bool keep_alive=true)
int select (u_int socket, int selection_mode, int timeout=0) const
int select (int_array &read_sox, int_array &write_sox, int timeout=0) const
int analyze_select_result (u_int socket, int mode, fd_set_wrapper &read_list, fd_set_wrapper &write_list, fd_set_wrapper &exceptions) const

Static Public Member Functions

static istring interest_name (int to_name)

Detailed Description

Definition at line 37 of file raw_socket.h.


Member Enumeration Documentation

enum raw_socket::select_types

Enumerator:
SELECTING_JUST_WRITE 
SELECTING_JUST_READ 

Definition at line 80 of file raw_socket.h.


Constructor & Destructor Documentation

raw_socket::raw_socket (  ) 

Definition at line 72 of file raw_socket.cpp.

raw_socket::~raw_socket (  ) 

Definition at line 76 of file raw_socket.cpp.

References WHACK().


Member Function Documentation

raw_socket::IMPLEMENT_CLASS_NAME ( "raw_socket"   ) 

int raw_socket::close ( u_int socket  ) 

Definition at line 81 of file raw_socket.cpp.

Referenced by spocket::accept(), and spocket::disconnect().

int raw_socket::ioctl ( u_int  socket,
int  request,
void *  argp 
) const

Definition at line 115 of file raw_socket.cpp.

Referenced by set_non_blocking().

bool raw_socket::set_non_blocking ( u_int  socket,
bool  non_blocking = true 
)

Definition at line 125 of file raw_socket.cpp.

References FUNCDEF, ioctl(), LOG, and negative().

Referenced by spocket::accept(), socket_minder::add_socket_data(), and spocket::connect().

bool raw_socket::set_nagle_algorithm ( u_int  socket,
bool  use_nagle = true 
)

Definition at line 136 of file raw_socket.cpp.

References FUNCDEF, LOG, negative(), and OPTYPE.

bool raw_socket::set_broadcast ( u_int  socket,
bool  broadcasting = true 
)

Definition at line 148 of file raw_socket.cpp.

References FUNCDEF, LOG, negative(), and OPTYPE.

Referenced by spocket::connect().

bool raw_socket::set_reuse_address ( u_int  socket,
bool  reuse = true 
)

Definition at line 160 of file raw_socket.cpp.

References FUNCDEF, LOG, negative(), and OPTYPE.

Referenced by spocket::accept(), and spocket::connect().

bool raw_socket::set_keep_alive ( u_int  socket,
bool  keep_alive = true 
)

Definition at line 172 of file raw_socket.cpp.

References FUNCDEF, LOG, negative(), and OPTYPE.

Referenced by spocket::connect().

istring raw_socket::interest_name ( int  to_name  )  [static]

Definition at line 103 of file raw_socket.cpp.

References combine(), SI_CONNECTED, SI_DISCONNECTED, SI_ERRONEOUS, SI_READABLE, and SI_WRITABLE.

Referenced by socket_data::text_form().

int raw_socket::select ( u_int  socket,
int  selection_mode,
int  timeout = 0 
) const

Definition at line 184 of file raw_socket.cpp.

References analyze_select_result(), FUNCDEF, and SI_ERRONEOUS.

Referenced by spocket::await_readable(), spocket::await_writable(), spocket::connected(), socket_minder::evaluate_interest(), socket_minder::push_receives(), spocket::receive(), select(), and socket_minder::snoozy_select().

int raw_socket::select ( int_array read_sox,
int_array write_sox,
int  timeout = 0 
) const

Definition at line 347 of file raw_socket.cpp.

References analyze_select_result(), portable::fill_timeval_ms(), FUNCDEF, array< contents >::length(), LOG, NIL, array< contents >::reset(), istring::s(), select(), SELECTING_JUST_WRITE, SI_ERRONEOUS, SOCK_EFAULT, SOCK_EINPROGRESS, SOCK_EINTR, SOCK_EINVAL, SOCK_ENETDOWN, SOCK_ENOTSOCK, SOCKET_ERROR, portable::system_error(), tcpip_stack::tcpip_error_name(), and array< contents >::zap().

int raw_socket::analyze_select_result ( u_int  socket,
int  mode,
fd_set_wrapper &  read_list,
fd_set_wrapper &  write_list,
fd_set_wrapper &  exceptions 
) const

Definition at line 266 of file raw_socket.cpp.

References FUNCDEF, LOG, MULTIPLE_DISCONNECT_CHECKS, SELECTING_JUST_WRITE, SI_DISCONNECTED, SI_ERRONEOUS, SI_READABLE, SI_WRITABLE, and istring::SPRINTF.

Referenced by select().


The documentation for this class was generated from the following files:
Generated on Fri Aug 29 04:30:42 2008 for HOOPLE Libraries by  doxygen 1.5.1