SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SLNet::RNS2_Berkley Class Reference

`#include <slikenet/socket2.h>`

Inheritance diagram for SLNet::RNS2_Berkley:

## Public Member Functions

| RNS2_Berkley ()
virtual | ~RNS2_Berkley ()
int | CreateRecvPollingThread (int threadPriority)
void | SignalStopRecvPollingThread (void)
void | BlockOnStopRecvPollingThread (void)
const RNS2_BerkleyBindParameters * | GetBindings (void) const
RNS2Socket | GetSocket (void) const
void | SetDoNotFragment (int opt)
Public Member Functions inherited from SLNet::IRNS2_Berkley
virtual RNS2BindResult | Bind (RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line)=0
Public Member Functions inherited from SLNet::RakNetSocket2
| RakNetSocket2 ()
virtual | ~RakNetSocket2 ()
void | SetRecvEventHandler (RNS2EventHandler *_eventHandler)
virtual RNS2SendResult | Send (RNS2_SendParameters *sendParameters, const char *file, unsigned int line)=0
RNS2Type | GetSocketType (void) const
void | SetSocketType (RNS2Type t)
bool | IsBerkleySocket (void) const
SystemAddress | GetBoundAddress (void) const
unsigned int | GetUserConnectionSocketIndex (void) const
void | SetUserConnectionSocketIndex (unsigned int i)
RNS2EventHandler * | GetEventHandler (void) const

## Protected Member Functions

RNS2BindResult | BindShared (RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line)
RNS2BindResult | BindSharedIPV4 (RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line)
RNS2BindResult | BindSharedIPV4And6 (RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line)
void | SetNonBlockingSocket (unsigned long nonblocking)
void | SetSocketOptions (void)
void | SetBroadcastSocket (int broadcast)
void | SetIPHdrIncl (int ipHdrIncl)
void | RecvFromBlocking (RNS2RecvStruct *recvFromStruct)
void | RecvFromBlockingIPV4 (RNS2RecvStruct *recvFromStruct)
void | RecvFromBlockingIPV4And6 (RNS2RecvStruct *recvFromStruct)
unsigned | RecvFromLoopInt (void)

## Static Protected Member Functions

static void | GetSystemAddressIPV4 (RNS2Socket rns2Socket, SystemAddress *systemAddressOut)
static void | GetSystemAddressIPV4And6 (RNS2Socket rns2Socket, SystemAddress *systemAddressOut)
static | RAK_THREAD_DECLARATION (RecvFromLoop)

## Protected Attributes

RNS2Socket | rns2Socket
RNS2_BerkleyBindParameters | binding
SLNet::LocklessUint32_t | isRecvFromLoopThreadActive
volatile bool | endThreads

## Additional Inherited Members

Static Public Member Functions inherited from SLNet::IRNS2_Berkley
static bool | IsPortInUse (unsigned short port, const char *hostAddress, unsigned short addressFamily, int type)

## Detailed Description

Definition at line 295 of file socket2.h.

## Constructor & Destructor Documentation

RNS2_Berkley::RNS2_Berkley | ( |  | ) |

Definition at line 384 of file RakNetSocket2.cpp.

References INVALID_SOCKET, and rns2Socket.

RNS2_Berkley::~RNS2_Berkley | ( |  | ) |

virtual

Definition at line 388 of file RakNetSocket2.cpp.

References closesocket__, INVALID_SOCKET, and rns2Socket.

## Member Function Documentation

RNS2BindResult RNS2_Berkley::BindShared | ( | RNS2_BerkleyBindParameters * | bindParameters,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

protected

Definition at line 308 of file RakNetSocket2.cpp.

References _FILE_AND_LINE_, binding, BindSharedIPV4(), BindSharedIPV4And6(), SLNet::RakNetSocket2::boundAddress, SLNet::BR_FAILED_SEND_TEST, SLNet::BR_SUCCESS, SLNet::RNS2_SendParameters::data, SLNet::RNS2_SendParameters::length, SLNet::RakNetSocket2::Send(), SLNet::RNS2_SendParameters::systemAddress, and SLNet::RNS2_SendParameters::ttl.

Referenced by SLNet::RNS2_Linux::Bind().

RNS2BindResult SLNet::RNS2_Berkley::BindSharedIPV4 | ( | RNS2_BerkleyBindParameters * | bindParameters,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

protected

Referenced by BindShared().

RNS2BindResult SLNet::RNS2_Berkley::BindSharedIPV4And6 | ( | RNS2_BerkleyBindParameters * | bindParameters,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

protected

Referenced by BindShared().

void RNS2_Berkley::BlockOnStopRecvPollingThread | ( | void |  | ) |

Definition at line 419 of file RakNetSocket2.cpp.

References _FILE_AND_LINE_, SLNet::RakNetSocket2::boundAddress, SLNet::RNS2_SendParameters::data, endThreads, SLNet::GetTimeMS(), SLNet::LocklessUint32_t::GetValue(), isRecvFromLoopThreadActive, SLNet::RNS2_SendParameters::length, RakSleep(), SLNet::RakNetSocket2::Send(), SLNet::RNS2_SendParameters::systemAddress, and SLNet::RNS2_SendParameters::ttl.

int RNS2_Berkley::CreateRecvPollingThread | ( | int | threadPriority | ) |

Definition at line 402 of file RakNetSocket2.cpp.

References SLNet::RakThread::Create(), and endThreads.

const RNS2_BerkleyBindParameters * RNS2_Berkley::GetBindings | ( | void |  | ) | const

Definition at line 440 of file RakNetSocket2.cpp.

References binding.

RNS2Socket RNS2_Berkley::GetSocket | ( | void |  | ) | const

Definition at line 441 of file RakNetSocket2.cpp.

References rns2Socket.

static void SLNet::RNS2_Berkley::GetSystemAddressIPV4 | ( | RNS2Socket | rns2Socket,
|  | SystemAddress * | systemAddressOut
| ) |  |

staticprotected

static void SLNet::RNS2_Berkley::GetSystemAddressIPV4And6 | ( | RNS2Socket | rns2Socket,
|  | SystemAddress * | systemAddressOut
| ) |  |

staticprotected

static SLNet::RNS2_Berkley::RAK_THREAD_DECLARATION | ( | RecvFromLoop |  | ) |

staticprotected

void SLNet::RNS2_Berkley::RecvFromBlocking | ( | RNS2RecvStruct * | recvFromStruct | ) |

protected

Referenced by RecvFromLoopInt().

void SLNet::RNS2_Berkley::RecvFromBlockingIPV4 | ( | RNS2RecvStruct * | recvFromStruct | ) |

protected

void SLNet::RNS2_Berkley::RecvFromBlockingIPV4And6 | ( | RNS2RecvStruct * | recvFromStruct | ) |

protected

unsigned RNS2_Berkley::RecvFromLoopInt | ( | void |  | ) |

protected

Definition at line 351 of file RakNetSocket2.cpp.

References _FILE_AND_LINE_, SLNet::RNS2EventHandler::AllocRNS2RecvStruct(), binding, SLNet::RNS2RecvStruct::bytesRead, SLNet::RNS2EventHandler::DeallocRNS2RecvStruct(), SLNet::LocklessUint32_t::Decrement(), endThreads, SLNet::RNS2_BerkleyBindParameters::eventHandler, SLNet::SystemAddress::GetPort(), SLNet::LocklessUint32_t::Increment(), isRecvFromLoopThreadActive, SLNet::RNS2EventHandler::OnRNS2Recv(), RakAssert, RakSleep(), RecvFromBlocking(), SLNet::RNS2RecvStruct::socket, and SLNet::RNS2RecvStruct::systemAddress.

Referenced by RAK_THREAD_DECLARATION().

void SLNet::RNS2_Berkley::SetBroadcastSocket | ( | int | broadcast | ) |

protected

void SLNet::RNS2_Berkley::SetDoNotFragment | ( | int | opt | ) |

void SLNet::RNS2_Berkley::SetIPHdrIncl | ( | int | ipHdrIncl | ) |

protected

void SLNet::RNS2_Berkley::SetNonBlockingSocket | ( | unsigned long | nonblocking | ) |

protected

void SLNet::RNS2_Berkley::SetSocketOptions | ( | void |  | ) |

protected

void RNS2_Berkley::SignalStopRecvPollingThread | ( | void |  | ) |

Definition at line 415 of file RakNetSocket2.cpp.

References endThreads.

## Member Data Documentation

RNS2_BerkleyBindParameters SLNet::RNS2_Berkley::binding

protected

Definition at line 326 of file socket2.h.

Referenced by BindShared(), GetBindings(), and RecvFromLoopInt().

volatile bool SLNet::RNS2_Berkley::endThreads

protected

Definition at line 330 of file socket2.h.

Referenced by BlockOnStopRecvPollingThread(), CreateRecvPollingThread(), RecvFromLoopInt(), and SignalStopRecvPollingThread().

SLNet::LocklessUint32_t SLNet::RNS2_Berkley::isRecvFromLoopThreadActive

protected

Definition at line 329 of file socket2.h.

Referenced by BlockOnStopRecvPollingThread(), and RecvFromLoopInt().

RNS2Socket SLNet::RNS2_Berkley::rns2Socket

protected

Definition at line 325 of file socket2.h.

Referenced by GetSocket(), RNS2_Berkley(), SLNet::RNS2_Linux::Send(), and ~RNS2_Berkley().

The documentation for this class was generated from the following files:

- Source/include/slikenet/socket2.h
- Source/src/RakNetSocket2.cpp