alternative Standard Libary  0.29.8
std::net::socket< TIPAddress > Template-Klassenreferenz

#include <socket.hpp>

+ Zusammengehörigkeiten von std::net::socket< TIPAddress >:

Öffentliche Typen

using Ipaddr_t = TIPAddress
 
using endpoint_t = end_point< Ipaddr_t >
 

Öffentliche Methoden

 socket (SocketInformation info)
 
 socket (AddrFamily addr, SocketTyp sockt, ProcType ptyp)
 
void Bind (const endpoint_t &localEndPoint)
 
void Listen (int backlog)
 
void Connect (Ipaddr_t ipaddr, const int port)
 
void Connect (std::string addr, const int port)
 
void Connect (const endpoint_t &ep)
 
void Disconnect (const bool b)
 
void shutdown (const int flags)
 
size_t receive (void *data, size_t offset, size_t size, const SocketFlags &flags, SocketError &error)
 
size_t receivefrom (void *data, size_t offset, size_t size, const SocketFlags &flags, endpoint_t ep)
 
size_t send (void *data, size_t offset, size_t size, const SocketFlags &flags, SocketError &error)
 
size_t sendto (void *data, size_t offset, size_t size, const SocketFlags &flags, endpoint_t ep)
 

Öffentliche, statische Methoden

static socket< Ipaddr_t > * Accept ()
 

Öffentliche Attribute

property< ProcType, socketProctocol {this, &socket::getProcType, &socket::setProcType}
 
property< AddrFamily, socketAdressFamily {this, &socket::getAddrFamily, &socket::setAddrFamily}
 
property< SocketTyp, socketTyp {this, &socket::getSocketTyp, &socket::setSocketTyp}
 
property< bool, socketDontFragment {this, &socket::getDontFragment, &socket::setDontFragment}
 
property< bool, socketDualMode {this, &socket::getDualMode, &socket::setDualMode}
 
property< bool, socketNoDelay {this, &socket::getNoDelay, &socket::setNoDelay}
 

Geschützte Methoden

void SocketDefaults ()
 
void InitializeSockets ()
 
ProcType getProcType ()
 
AddrFamily getAddrFamily ()
 
SocketTyp getSocketTyp ()
 
void setProcType (const ProcType v)
 
void setAddrFamily (const AddrFamily v)
 
void setSocketTyp (const SocketTyp v)
 
bool getDontFragment ()
 
void setDontFragment (const bool v)
 
bool getDualMode ()
 
void setDualMode (const bool v)
 
bool getNoDelay ()
 
void setNoDelay (const bool v)
 
endpoint_tgetLocalEndPoint ()
 
endpoint_tgetRemoteEndPoint ()
 

Ausführliche Beschreibung

template<class TIPAddress>
class std::net::socket< TIPAddress >

Dokumentation der benutzerdefinierten Datentypen

◆ endpoint_t

template<class TIPAddress >
using std::net::socket< TIPAddress >::endpoint_t = end_point<Ipaddr_t>

◆ Ipaddr_t

template<class TIPAddress >
using std::net::socket< TIPAddress >::Ipaddr_t = TIPAddress

Beschreibung der Konstruktoren und Destruktoren

◆ socket() [1/2]

template<class TIPAddress >
std::net::socket< TIPAddress >::socket ( SocketInformation  info)
inline
71  {
72  m_addrFamily = info.AdressFamily;
73  m_procType = info.Proctocol;
74  m_skTyp = info.Type;
75  m_isBound = info.IsBound;
76 
77  m_isListing = (info.Options & SocketInformationOptions::Listing) != 0;
78  m_isConnected = (info.Options & SocketInformationOptions::Conected) != 0;
79  m_usedOverlappedIO = (info.Options & SocketInformationOptions::UseOnlyOverlappedIO) != 0;
80  m_isBloking = (info.Options & SocketInformationOptions::NonBlocking) == 0;
81 
84  }
void InitializeSockets()
Definition: socket.hpp:152
void SocketDefaults()
Definition: socket.hpp:140

◆ socket() [2/2]

template<class TIPAddress >
std::net::socket< TIPAddress >::socket ( AddrFamily  addr,
SocketTyp  sockt,
ProcType  ptyp 
)
inline
85  {
86  m_addrFamily = addr;
87  m_skTyp = sockt;
88  m_procType = ptyp;
89  m_isConnected = true;
91  }
void InitializeSockets()
Definition: socket.hpp:152

Dokumentation der Elementfunktionen

◆ Accept()

template<class TIPAddress >
static socket<Ipaddr_t>* std::net::socket< TIPAddress >::Accept ( )
inlinestatic
92  {
93 
94  }

◆ Bind()

template<class TIPAddress >
void std::net::socket< TIPAddress >::Bind ( const endpoint_t localEndPoint)
inline
95  {
96 
97  int error = 0;
98  // internal error =...
99 
100  if(error == 0) m_isBound = true;
101  m_seedEndPoint = localEndPoint;
102  }

◆ Connect() [1/3]

template<class TIPAddress >
void std::net::socket< TIPAddress >::Connect ( Ipaddr_t  ipaddr,
const int  port 
)
inline
107  {
108 
109  }

◆ Connect() [2/3]

template<class TIPAddress >
void std::net::socket< TIPAddress >::Connect ( std::string  addr,
const int  port 
)
inline
110  {
111 
112  }

◆ Connect() [3/3]

template<class TIPAddress >
void std::net::socket< TIPAddress >::Connect ( const endpoint_t ep)
inline
113  {
114 
115  }

◆ Disconnect()

template<class TIPAddress >
void std::net::socket< TIPAddress >::Disconnect ( const bool  b)
inline
116  {
117 
118  }

◆ getAddrFamily()

template<class TIPAddress >
AddrFamily std::net::socket< TIPAddress >::getAddrFamily ( )
inlineprotected
157 { return m_addrFamily; }

◆ getDontFragment()

template<class TIPAddress >
bool std::net::socket< TIPAddress >::getDontFragment ( )
inlineprotected
164  {
165 
166  }

◆ getDualMode()

template<class TIPAddress >
bool std::net::socket< TIPAddress >::getDualMode ( )
inlineprotected
170  {
171 
172  }

◆ getLocalEndPoint()

template<class TIPAddress >
endpoint_t* std::net::socket< TIPAddress >::getLocalEndPoint ( )
inlineprotected
182  {
183  if(m_seedEndPoint == 0) return 0;
184 
185  int error =0;
186  // AddrFamily s = std::Sys::sGetEndPoint(void*, m_addrFamily, error);
187  //return m_seedEndPoint.Create(s);
188  }

◆ getNoDelay()

template<class TIPAddress >
bool std::net::socket< TIPAddress >::getNoDelay ( )
inlineprotected
176  {
177 
178  }

◆ getProcType()

template<class TIPAddress >
ProcType std::net::socket< TIPAddress >::getProcType ( )
inlineprotected
156 { return m_procType; }

◆ getRemoteEndPoint()

template<class TIPAddress >
endpoint_t* std::net::socket< TIPAddress >::getRemoteEndPoint ( )
inlineprotected
189  {
190  if(m_seedEndPoint == 0 && !m_isConnected) return 0;
191 
192  int error =0;
193  // AddrFamily s = std::Sys::sGetRemoteEndPoint(void*, m_addrFamily, error);
194  //return m_seedEndPoint.Create(s);
195  }

◆ getSocketTyp()

template<class TIPAddress >
SocketTyp std::net::socket< TIPAddress >::getSocketTyp ( )
inlineprotected
158 { return m_skTyp; }

◆ InitializeSockets()

template<class TIPAddress >
void std::net::socket< TIPAddress >::InitializeSockets ( )
inlineprotected
152  {
153  //std::Sys::sCreate(....);
154  }

◆ Listen()

template<class TIPAddress >
void std::net::socket< TIPAddress >::Listen ( int  backlog)
inline
103  {
104 
105  m_isListing = true;
106  }

◆ receive()

template<class TIPAddress >
size_t std::net::socket< TIPAddress >::receive ( void *  data,
size_t  offset,
size_t  size,
const SocketFlags &  flags,
SocketError &  error 
)
inline
124  {
125 
126  }

◆ receivefrom()

template<class TIPAddress >
size_t std::net::socket< TIPAddress >::receivefrom ( void *  data,
size_t  offset,
size_t  size,
const SocketFlags &  flags,
endpoint_t  ep 
)
inline
128  {
129 
130  }

◆ send()

template<class TIPAddress >
size_t std::net::socket< TIPAddress >::send ( void *  data,
size_t  offset,
size_t  size,
const SocketFlags &  flags,
SocketError &  error 
)
inline
132  {
133 
134  }

◆ sendto()

template<class TIPAddress >
size_t std::net::socket< TIPAddress >::sendto ( void *  data,
size_t  offset,
size_t  size,
const SocketFlags &  flags,
endpoint_t  ep 
)
inline
136  {
137 
138  }

◆ setAddrFamily()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setAddrFamily ( const AddrFamily  v)
inlineprotected
161 { m_addrFamily; }

◆ setDontFragment()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setDontFragment ( const bool  v)
inlineprotected
167  {
168 
169  }

◆ setDualMode()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setDualMode ( const bool  v)
inlineprotected
173  {
174 
175  }

◆ setNoDelay()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setNoDelay ( const bool  v)
inlineprotected
179  {
180 
181  }

◆ setProcType()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setProcType ( const ProcType  v)
inlineprotected
160 { m_procType; }

◆ setSocketTyp()

template<class TIPAddress >
void std::net::socket< TIPAddress >::setSocketTyp ( const SocketTyp  v)
inlineprotected
162 { m_skTyp; }

◆ shutdown()

template<class TIPAddress >
void std::net::socket< TIPAddress >::shutdown ( const int  flags)
inline
119  {
120 
121  }

◆ SocketDefaults()

template<class TIPAddress >
void std::net::socket< TIPAddress >::SocketDefaults ( )
inlineprotected
140  {
141  try {
142  if(m_addrFamily == AddrFamily::Internet) {
143  DontFragment = false;
144  if(m_procType == ProcType::TCP)
145  NoDelay = false;
146  } else if(m_addrFamily == AddrFamily::InternetV6 )
147  DualMode = true;
148  } catch(...) {
149 
150  }
151  }
property< bool, socket > NoDelay
Definition: socket.hpp:69
property< bool, socket > DontFragment
Definition: socket.hpp:65
property< bool, socket > DualMode
Definition: socket.hpp:67

Dokumentation der Datenelemente

◆ AdressFamily

template<class TIPAddress >
property<AddrFamily, socket> std::net::socket< TIPAddress >::AdressFamily {this, &socket::getAddrFamily, &socket::setAddrFamily}

◆ DontFragment

template<class TIPAddress >
property<bool, socket> std::net::socket< TIPAddress >::DontFragment {this, &socket::getDontFragment, &socket::setDontFragment}

◆ DualMode

template<class TIPAddress >
property<bool, socket> std::net::socket< TIPAddress >::DualMode {this, &socket::getDualMode, &socket::setDualMode}

◆ NoDelay

template<class TIPAddress >
property<bool, socket> std::net::socket< TIPAddress >::NoDelay {this, &socket::getNoDelay, &socket::setNoDelay}

◆ Proctocol

template<class TIPAddress >
property<ProcType, socket> std::net::socket< TIPAddress >::Proctocol {this, &socket::getProcType, &socket::setProcType}

◆ Typ

template<class TIPAddress >
property<SocketTyp, socket> std::net::socket< TIPAddress >::Typ {this, &socket::getSocketTyp, &socket::setSocketTyp}

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: