sockets Namespace Reference

Provides access to the operating system's socket methods. More...

Classes

class  base_address
class  internet_address
 this type of address describes a destination out on the internet. More...
class  machine_uid
class  internet_machine_uid
class  machine_uid_array
class  range_limiter
 provides a mechanism for restricting access to a resource by the client's IP address. More...
class  raw_socket
class  sequence_tracker
 this will keep track of sequencing for a communication process on a per host basis. More...
class  socket_data
class  socket_minder
class  span_manager
 Manages lists of numbers representing the completion of some activity. More...
class  spocket
 Abstraction for a higher-level BSD socket that is platform independent. More...
class  subnet_calculator
 Provides an easy way to determine the range of a subnet given the subnet mask and a sample IP address. More...
class  tcpip_stack
 Helpful functions for interacting with TCP/IP stacks. More...
class  communication_commons
 Defines our communication related outcome values. More...
class  throughput_counter
 Reports on average bandwidth of the transfers being measured. More...

Typedefs

typedef void sock_hop

Enumerations

enum  socket_interests {
  SI_READABLE = 0x1, SI_WRITABLE = 0x2, SI_CONNECTED = 0x4, SI_DISCONNECTED = 0x8,
  SI_ERRONEOUS = 0x10, SI_BASELINE = 0x20, SI_ALL_SOCK_INT = 0xFF
}

Functions

 SAFE_STATIC_CONST (byte_array, internet_address::localhost,(ADDRESS_SIZE, localhosts_bytes)) bool internet_address
 SAFE_STATIC_CONST (byte_array, internet_address::nil_address,(ADDRESS_SIZE, nil_address_bytes)) bool internet_address
void combine (astring &existing, const astring &addition)

Variables

const abyte localhosts_bytes [] = { 127, 0, 0, 1 }
const abyte nil_address_bytes [] = { 0, 0, 0, 0 }
const int MULTIPLE_DISCONNECT_CHECKS = 28
const basis::un_int NON_BLOCKING = FIONBIO
const basis::un_int IOCTL_READ = FIONREAD
const int MAX_BITS_FOR_SEQ_HASH = 10
const int CLEANING_SPAN = 20000
const int MAX_ITEMS = 200
const int SOCKET_CHECK_INTERVAL = 50
const int SOCKMIND_MAXIMUM_RECEIVES = 10
const int MAXIMUM_TRANSFER_CHUNK = 512 * KILOBYTE
const int CONN_ALERT_INTERVAL = 100
const int MULTI_SELECT_TIMEOUT = 250
const int PENDING_CONNECTIONS_ALLOWED = 14
const int RESOLVE_INTERVAL = 300

Detailed Description

Provides access to the operating system's socket methods.

NOTE: This class does not provide any sort of synchronization of the sockets involved. If you have multiple threads arbitrarily calling select and read, then some selects will claim the socket was disconnected (since the other thread might have grabbed the data that seemed to be ready but then wasn't--a sign of a disconnect). Ensure that your accesses of the socket are serialized.


Typedef Documentation

typedef void sockets::sock_hop

Definition at line 158 of file raw_socket.h.


Enumeration Type Documentation

Enumerator:
SI_READABLE 
SI_WRITABLE 
SI_CONNECTED 
SI_DISCONNECTED 
SI_ERRONEOUS 
SI_BASELINE 
SI_ALL_SOCK_INT 

Definition at line 42 of file raw_socket.h.


Function Documentation

void sockets::combine ( astring existing,
const astring addition 
)

Definition at line 103 of file raw_socket.cpp.

References basis::astring::t().

Referenced by sockets::raw_socket::interest_name().

sockets::SAFE_STATIC_CONST ( byte_array  ,
internet_address::nil_address  ,
(ADDRESS_SIZE, nil_address_bytes)   
)

Definition at line 278 of file internet_address.cpp.

sockets::SAFE_STATIC_CONST ( byte_array  ,
internet_address::localhost  ,
(ADDRESS_SIZE, localhosts_bytes)   
)

Definition at line 173 of file internet_address.cpp.

References basis::astring::equal_to(), and basis::astring::to_lower().


Variable Documentation

const int sockets::CLEANING_SPAN = 20000

Definition at line 39 of file sequence_tracker.cpp.

Definition at line 63 of file socket_minder.cpp.

Referenced by sockets::socket_minder::handle_pending_connecters().

Definition at line 62 of file raw_socket.cpp.

const abyte sockets::localhosts_bytes[] = { 127, 0, 0, 1 }

Definition at line 172 of file internet_address.cpp.

Definition at line 36 of file sequence_tracker.cpp.

const int sockets::MAX_ITEMS = 200

Definition at line 43 of file sequence_tracker.cpp.

const int sockets::MAXIMUM_TRANSFER_CHUNK = 512 * KILOBYTE

Definition at line 60 of file socket_minder.cpp.

Referenced by sockets::socket_minder::push_receives().

Definition at line 67 of file socket_minder.cpp.

Referenced by sockets::socket_minder::snoozy_select().

Definition at line 52 of file raw_socket.cpp.

Referenced by sockets::raw_socket::analyze_select_result().

const abyte sockets::nil_address_bytes[] = { 0, 0, 0, 0 }

Definition at line 277 of file internet_address.cpp.

Definition at line 61 of file raw_socket.cpp.

Referenced by sockets::raw_socket::set_non_blocking().

Definition at line 56 of file spocket.cpp.

Referenced by sockets::spocket::accept().

const int sockets::RESOLVE_INTERVAL = 300

Definition at line 61 of file spocket.cpp.

Definition at line 54 of file socket_minder.cpp.

Definition at line 57 of file socket_minder.cpp.

Referenced by sockets::socket_minder::push_receives().

Generated on Sat Jan 28 04:25:53 2012 for hoople2 project by  doxygen 1.6.3