Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
(NazaraNetwork) Network module

Classes

class  Nz::AbstractSocket
 Network class that represents the base of socket. More...
 
class  Nz::IpAddress
 Network class that represents an IP address. More...
 
class  Nz::NetPacket
 Network class that represents a packet. More...
 
class  Nz::Network
 Network class that represents the module initializer of Network. More...
 
class  Nz::RUdpConnection
 Network class that represents a reliable UDP connection. More...
 
class  Nz::SocketPoller
 Network class allowing an application to wait on multiples sockets for them to become active (readable) More...
 
class  Nz::TcpClient
 Network class that represents a client in a TCP connection. More...
 
class  Nz::TcpServer
 Network class that represents a server in a TCP connection. More...
 
class  Nz::UdpSocket
 Network class that represents a UDP socket, allowing for sending/receiving datagrams. More...
 

Functions

NAZARA_NETWORK_API const char * Nz::ErrorToString (Nz::ResolveError resolveError)
 Returns the text representation of an error. More...
 
NAZARA_NETWORK_API const char * Nz::ErrorToString (Nz::SocketError socketError)
 Returns the text representation of an error. More...
 
NAZARA_NETWORK_API bool Nz::ParseIPAddress (const char *addressPtr, UInt8 result[16], UInt16 *port, bool *isIPv6, const char **endOfRead)
 Parse a textual IPv4 or IPv6 address. More...
 

Detailed Description

Network/System module including classes to handle networking elements...

Function Documentation

◆ ErrorToString() [1/2]

const char * Nz::ErrorToString ( Nz::ResolveError  resolveError)

Returns the text representation of an error.

Returns
Text representation of an error
Parameters
resolveErrorError enumeration

◆ ErrorToString() [2/2]

const char * Nz::ErrorToString ( Nz::SocketError  socketError)

Returns the text representation of an error.

Returns
Text representation of an error
Parameters
socketErrorError enumeration

◆ ParseIPAddress()

bool Nz::ParseIPAddress ( const char *  addressPtr,
UInt8  result[16],
UInt16 *  port,
bool *  isIPv6,
const char **  endOfRead 
)

Parse a textual IPv4 or IPv6 address.

Returns
true If successful

From http://rosettacode.org/wiki/Parse_an_IP_Address Parse a textual IPv4 or IPv6 address, optionally with port, into a binary array (for the address, in host order), and an optionally provided port. Also, indicate which of those forms (4 or 6) was parsed.

Parameters
addressPtrC-string which symbolizes the ip adress
resultByte array to return the result in
portOptional argument to resolve according to a specific port
isIPv6Optional argument to determine if the address is IPv6
endOfReadOptional argument to determine where parsing stopped
Remarks
Produces a NazaraAssert if addressPtr is invalid
Produces a NazaraAssert if result is invalid