NetCpp  v0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
net Namespace Reference

Namespaces

namespace  ip4
namespace  local

Classes

struct  __buffer
 Structure to avoid issues when giving buffers to AbstractSocket. More...
class  AbstractSocket
 Base abstract class for protocols. More...
class  AbstractSystemSocket
 Virtual class for platform-dependent code. More...
class  Address
 Base class for all addresses. More...
class  PosixSocket
 Class for platform-dependent code. More...
class  protocol
 Protocol used for the communication. More...

Enumerations

enum  protocol_type
 Protocol type. More...
enum  protocol_domain
 Protocol domain. More...

Functions

template<std::size_t N>
__buffer buffer (std::array< char, N > &buf)
 Function to pass a std::array to AbstractSocket.
std::unique_ptr
< AbstractSystemSocket
createSocket (const protocol &prot)

Variables

static const net::protocol_type STREAM = net::protocol_type::STREAM
static const net::protocol_type DGRAM = net::protocol_type::STREAM
static const net::protocol_domain IPv4 = net::protocol_domain::IPv4
static const net::protocol_domain LOCAL = net::protocol_domain::LOCAL

Enumeration Type Documentation

Protocol domain.

Definition at line 45 of file protocol.hpp.

{
LOCAL, //< Local (e.g., Unix) communications
IPv4 //< IPv4 communications
};

Protocol type.

Definition at line 37 of file protocol.hpp.

{
STREAM, //< Stream (e.g., TCP) communications
DGRAM //< Dgram (e.g., UDP) communications
};

Function Documentation

__buffer net::buffer ( std::array< char, N > &  buf)
inline

Function to pass a std::array to AbstractSocket.

Parameters
referenceto a std::array<char>
Returns
a __buffer structure

Definition at line 65 of file abstract_socket.hpp.

{
return __buffer {reinterpret_cast<void*>(buf.data()), buf.size()};
}
std::unique_ptr<AbstractSystemSocket> net::createSocket ( const protocol &  prot)
inline

Definition at line 39 of file platform.hpp.

{
std::unique_ptr<AbstractSystemSocket> ret (new net::PosixSocket(prot));
return ret;
}

Here is the caller graph for this function:

Variable Documentation

const net::protocol_type DGRAM = net::protocol_type::STREAM
static

Definition at line 122 of file protocol.hpp.

const net::protocol_domain IPv4 = net::protocol_domain::IPv4
static

Definition at line 123 of file protocol.hpp.

const net::protocol_domain LOCAL = net::protocol_domain::LOCAL
static

Definition at line 124 of file protocol.hpp.

const net::protocol_type STREAM = net::protocol_type::STREAM
static

Definition at line 121 of file protocol.hpp.