Network Namespace Reference

Network namespace represent all networks connection. More...

Classes

class  LocalSocket
 This class represent a local connection (client and server). More...
class  NetSocket
 This class represent an abstract socket connection (udp | tcp server | tcp client). More...
class  Socket
 This class represent an abstract socket connection (udp | tcp server | tcp client). More...
class  Exception
 This class is the top exception class used in libsocket. More...
class  TcpSocket
 This class represent a tcp connection (client and server). More...
class  UdpSocket
 This class represent a udp connection (client and server). More...

Typedefs

typedef enum Network::e_gnutls_kind GnuTLSKind
typedef enum Network::e_pkind PROTO_KIND
typedef enum Network::e_kind SOCKET_KIND
typedef enum Network::e_version SOCKET_VERSION

Enumerations

enum  e_gnutls_kind { LIBSOCKET_TLS, LIBSOCKET_SSL }
enum  e_pkind { text, binary }
enum  e_kind { TCP, UDP, LOCAL }
enum  e_version { V4, V6 }

Functions

Socketoperator<< (Socket &s, const std::string &str)
 write a string on current socket
Socketoperator>> (Socket &s, std::string &str)
 read a string on current socket
std::ostream & operator<< (std::ostream &stream, Exception &e)
 NEW_EXCEPTION (HostnameError)
 exception launched when a hostname is incorrect
 NEW_EXCEPTION (Ipv6SupportError)
 exception launched when user want ipv6, but lib is not compiled with
 NEW_EXCEPTION (TLSError)
 exception launched when error is received during TLS initialization
 NEW_EXCEPTION (InvalidFile)
 exception launched when a file does not exist
 NEW_EXCEPTION (TLSSupportError)
 exception launched when user want TLS, but lib is not compiled with
 NEW_EXCEPTION (InetptonError)
 exception launched when a addr is invalid pour inet_pton
 NEW_EXCEPTION (InetntopError)
 exception launched when the addr is not valid for inet_ntop
 NEW_EXCEPTION (ConnectionClosed)
 exception launched when connection is closed
 NEW_EXCEPTION (NoConnection)
 exception launched when there is no active connection
 NEW_EXCEPTION (Timeout)
 exception launched when there is a timeout
 NEW_EXCEPTION (BindError)
 exception launched when bind libc function return an error
 NEW_EXCEPTION (SocketError)
 exception launched when socket libc function return an error
 NEW_EXCEPTION (ListenError)
 exception launched when listen libc function return an error
 NEW_EXCEPTION (SetsockoptError)
 exception launched when setsockopt libc function return an error
 NEW_EXCEPTION (CloseError)
 exception launched when close libc function return an error
 NEW_EXCEPTION (SelectError)
 exception launched when select libc function return an error
 NEW_EXCEPTION (ConnectError)
 exception launched when connect libc function return an error
 NEW_EXCEPTION (AcceptError)
 exception launched when accept libc function return an error
 NEW_EXCEPTION (GetpeernameError)
 exception launched when getpeername libc function return an error
 NEW_EXCEPTION (WSAStartupError)
 exception launched when WSAStartup windows function return an error

Detailed Description

Network namespace represent all networks connection.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
LIBSOCKET_TLS 
LIBSOCKET_SSL 

Definition at line 66 of file socket.hh.

00067     {
00068       LIBSOCKET_TLS,
00069       LIBSOCKET_SSL
00070     } GnuTLSKind;

Enumerator:
TCP 
UDP 
LOCAL 

Definition at line 78 of file socket.hh.

00079     {
00080       TCP,
00081       UDP,
00082       LOCAL
00083     } SOCKET_KIND;

Enumerator:
text 
binary 

Definition at line 72 of file socket.hh.

00073     {
00074       text,
00075       binary
00076     } PROTO_KIND;

Enumerator:
V4 
V6 

Definition at line 85 of file socket.hh.

00086     {
00087       V4,
00088       V6
00089     } SOCKET_VERSION;


Function Documentation

Network::NEW_EXCEPTION ( WSAStartupError   ) 

exception launched when WSAStartup windows function return an error

Network::NEW_EXCEPTION ( GetpeernameError   ) 

exception launched when getpeername libc function return an error

Network::NEW_EXCEPTION ( AcceptError   ) 

exception launched when accept libc function return an error

Network::NEW_EXCEPTION ( ConnectError   ) 

exception launched when connect libc function return an error

Network::NEW_EXCEPTION ( SelectError   ) 

exception launched when select libc function return an error

Network::NEW_EXCEPTION ( CloseError   ) 

exception launched when close libc function return an error

Network::NEW_EXCEPTION ( SetsockoptError   ) 

exception launched when setsockopt libc function return an error

Network::NEW_EXCEPTION ( ListenError   ) 

exception launched when listen libc function return an error

Network::NEW_EXCEPTION ( SocketError   ) 

exception launched when socket libc function return an error

Network::NEW_EXCEPTION ( BindError   ) 

exception launched when bind libc function return an error

Network::NEW_EXCEPTION ( Timeout   ) 

exception launched when there is a timeout

Network::NEW_EXCEPTION ( NoConnection   ) 

exception launched when there is no active connection

Network::NEW_EXCEPTION ( ConnectionClosed   ) 

exception launched when connection is closed

Network::NEW_EXCEPTION ( InetntopError   ) 

exception launched when the addr is not valid for inet_ntop

Network::NEW_EXCEPTION ( InetptonError   ) 

exception launched when a addr is invalid pour inet_pton

Network::NEW_EXCEPTION ( TLSSupportError   ) 

exception launched when user want TLS, but lib is not compiled with

Network::NEW_EXCEPTION ( InvalidFile   ) 

exception launched when a file does not exist

Network::NEW_EXCEPTION ( TLSError   ) 

exception launched when error is received during TLS initialization

Network::NEW_EXCEPTION ( Ipv6SupportError   ) 

exception launched when user want ipv6, but lib is not compiled with

Network::NEW_EXCEPTION ( HostnameError   ) 

exception launched when a hostname is incorrect

std::ostream & Network::operator<< ( std::ostream &  stream,
Exception &  e 
)
Socket & Network::operator<< ( Socket &  s,
const std::string &  str 
)

write a string on current socket

Socket & Network::operator>> ( Socket &  s,
std::string &  str 
)

read a string on current socket


Generated by  doxygen 1.6.2