Socket Namespace Reference


Detailed Description

Socket types and protocols for easier SSocket class usage.


Classes

class  _Endl
 Line ending object, similar to std::endl. More...

Functions

uint32_t makeAddr (const std::string &addr)
 Makes internet address from string.
std::string getAddr (uint32_t ip)
 Creates human-readable address from ip.

Variables

_Endl Endl
 Line ending object, similar to std::endl.

Function Documentation

DLLEXPORT std::string Socket::getAddr uint32_t  ip  ) 
 

Creates human-readable address from ip.

Basically this is inet_aton.

Parameters:
ip Ip address
Returns:
Human-readable address, e.g. "127.0.0.1"

Definition at line 37 of file ipv4addr.cpp.

Referenced by IPV4Address::getAddrStr().

DLLEXPORT uint32_t Socket::makeAddr const std::string &  data  ) 
 

Makes internet address from string.

Basically this is inet_ntoa()

Parameters:
data Dot-separated IP address, e.g. "127.0.0.1"
Returns:
Internet address, used in binary formats.

Definition at line 34 of file ipv4addr.cpp.

Referenced by SchedBase::SchedBase(), and IPV4Address::setAddr().


Variable Documentation

DLLEXPORT class Socket::_Endl Socket::Endl
 

Line ending object, similar to std::endl.

When dealing with plain-text protocols over sockets,
is used to indicate newline. Usage:

 SocketClient *c;
 *c << "Message" << Socket::Endl;