|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLNET::CUdpSimSock Class ReferenceCUdpSimSock: Unreliable datagram socket via UDP but packet lost, lag simulation.
More...
#include <udp_sim_sock.h>
List of all members.
Public Methods |
| CUdpSimSock (bool logging=true) |
void | connect (const CInetAddress &addr) |
void | close () |
bool | dataAvailable () |
bool | receive (uint8 *buffer, uint32 &len, bool throw_exception=true) |
CSock::TSockResult | send (const uint8 *buffer, uint32 &len, bool throw_exception=true) |
void | sendTo (const uint8 *buffer, uint32 &len, const CInetAddress &addr) |
bool | connected () |
const CInetAddress & | localAddr () const |
Static Public Methods |
void | setSimValues (NLMISC::CConfigFile &cf) |
Public Attributes |
CUdpSock | UdpSock |
Private Methods |
void | updateBufferizedPackets () |
void | sendUDP (const uint8 *buffer, uint32 &len, const CInetAddress *addr=NULL) |
void | sendUDPNow (const uint8 *buffer, uint32 len, const CInetAddress *addr=NULL) |
Static Private Attributes |
uint32 | _InLag = 0 |
uint8 | _InPacketLoss = 0 |
uint32 | _OutLag = 0 |
uint8 | _OutPacketLoss = 0 |
uint8 | _OutPacketDuplication = 0 |
uint8 | _OutPacketDisordering = 0 |
Friends |
void | cbSimVar (NLMISC::CConfigFile::CVar &var) |
Detailed Description
CUdpSimSock: Unreliable datagram socket via UDP but packet lost, lag simulation.
See class CUdpSock.
Notes: InLag must be >0 to use the InPacketLoss variable
-
Author:
-
Vianney Lecroart , Nevrax France
-
Date:
-
2002
Definition at line 49 of file udp_sim_sock.h.
Constructor & Destructor Documentation
NLNET::CUdpSimSock::CUdpSimSock |
( |
bool |
logging = true |
) |
[inline] |
|
Member Function Documentation
void NLNET::CUdpSimSock::close |
( |
|
) |
|
|
void NLNET::CUdpSimSock::connect |
( |
const CInetAddress & |
addr |
) |
|
|
bool NLNET::CUdpSimSock::connected |
( |
|
) |
|
|
bool NLNET::CUdpSimSock::dataAvailable |
( |
|
) |
|
|
const CInetAddress& NLNET::CUdpSimSock::localAddr |
( |
|
) |
const [inline] |
|
bool NLNET::CUdpSimSock::receive |
( |
uint8 * |
buffer, |
|
|
uint32 & |
len, |
|
|
bool |
throw_exception = true |
|
) |
|
|
void NLNET::CUdpSimSock::sendUDP |
( |
const uint8 * |
buffer, |
|
|
uint32 & |
len, |
|
|
const CInetAddress * |
addr = NULL |
|
) |
[private] |
|
|
Definition at line 115 of file udp_sim_sock.cpp.
References _OutLag, _OutPacketDisordering, _OutPacketDuplication, _OutPacketLoss, addr, NLNET::buffer, NLNET::BufferizedOutPackets, nlassert, sendUDPNow, t, NLMISC::TTime, and UdpSock.
Referenced by send, and sendTo. |
void NLNET::CUdpSimSock::sendUDPNow |
( |
const uint8 * |
buffer, |
|
|
uint32 |
len, |
|
|
const CInetAddress * |
addr = NULL |
|
) |
[private] |
|
void NLNET::CUdpSimSock::updateBufferizedPackets |
( |
|
) |
[private] |
|
Friends And Related Function Documentation
Member Data Documentation
uint32 NLNET::CUdpSimSock::_InLag = 0 [static, private]
|
|
uint8 NLNET::CUdpSimSock::_InPacketLoss = 0 [static, private]
|
|
uint32 NLNET::CUdpSimSock::_OutLag = 0 [static, private]
|
|
uint8 NLNET::CUdpSimSock::_OutPacketDisordering = 0 [static, private]
|
|
uint8 NLNET::CUdpSimSock::_OutPacketDuplication = 0 [static, private]
|
|
uint8 NLNET::CUdpSimSock::_OutPacketLoss = 0 [static, private]
|
|
The documentation for this class was generated from the following files:
|
|