SLikeNet 0.1.3

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
types.h File Reference

Types used by RakNet, most of which involve user code. More...

`#include "defines.h"`
`#include "NativeTypes.h"`
`#include "time.h"`
`#include "Export.h"`
`#include "WindowsIncludes.h"`
`#include "XBox360Includes.h"`
`#include "SocketIncludes.h"`

Go to the source code of this file.

## Classes

struct | SLNet::PublicKey
| Passed to RakPeerInterface::Connect() More...
struct | SLNet::SocketDescriptor
| Describes the local socket to use for RakPeer::Startup. More...
struct | SLNet::SystemAddress
| Network address for a system. More...
struct | SLNet::RakNetGUID
struct | SLNet::AddressOrGUID
struct | SLNet::Packet
| This represents a user message from another system. More...
struct | SLNet::uint24_t

## Namespaces

namespace | SLNet
| Simple class to send changes between directories. In essence, a simple autopatcher that can be used for transmitting levels, skins, etc.

## Macros

#define | BITS_TO_BYTES(x) (((x)+7)>>3)
| Given a number of bits, return how many bytes are needed to represent that.
#define | BYTES_TO_BITS(x) ((x)<<3)
#define | PRINTF_64_BIT_MODIFIER "ll"

## Typedefs

typedef unsigned char | SLNet::UniqueIDType
typedef unsigned short | SLNet::SystemIndex
typedef unsigned char | SLNet::RPCIndex
typedef unsigned char | SLNet::MessageID
| First byte of a network message.
typedef uint32_t | SLNet::BitSize_t
typedef uint64_t | SLNet::NetworkID

## Enumerations

enum

SLNet::StartupResult {
SLNet::RAKNET_STARTED, SLNet::RAKNET_ALREADY_STARTED, SLNet::INVALID_SOCKET_DESCRIPTORS, SLNet::INVALID_MAX_CONNECTIONS,
SLNet::SOCKET_FAMILY_NOT_SUPPORTED, SLNet::SOCKET_PORT_ALREADY_IN_USE, SLNet::SOCKET_FAILED_TO_BIND, SLNet::SOCKET_FAILED_TEST_SEND,
SLNet::PORT_CANNOT_BE_ZERO, SLNet::FAILED_TO_CREATE_NETWORK_THREAD, SLNet::COULD_NOT_GENERATE_GUID, SLNet::STARTUP_OTHER_FAILURE
}

enum | SLNet::ConnectionAttemptResult { SLNet::CONNECTION_ATTEMPT_STARTED, SLNet::INVALID_PARAMETER, SLNet::CANNOT_RESOLVE_DOMAIN_NAME, SLNet::ALREADY_CONNECTED_TO_ENDPOINT, SLNet::CONNECTION_ATTEMPT_ALREADY_IN_PROGRESS, SLNet::SECURITY_INITIALIZATION_FAILED }
enum | SLNet::ConnectionState { SLNet::IS_PENDING, SLNet::IS_CONNECTING, SLNet::IS_CONNECTED, SLNet::IS_DISCONNECTING, SLNet::IS_SILENTLY_DISCONNECTING, SLNet::IS_DISCONNECTED, SLNet::IS_NOT_CONNECTED }
| Returned from RakPeerInterface::GetConnectionState() More...
enum | SLNet::PublicKeyMode { SLNet::PKM_INSECURE_CONNECTION, SLNet::PKM_ACCEPT_ANY_PUBLIC_KEY, SLNet::PKM_USE_KNOWN_PUBLIC_KEY, SLNet::PKM_USE_TWO_WAY_AUTHENTICATION }
| Used with the PublicKey structure. More...

## Functions

bool | SLNet::NonNumericHostString (const char *host)
const RakNetGUID | SLNet::UNASSIGNED_RAKNET_GUID ((uint64_t)-1)

## Variables

const int | SLNet::MAX_RPC_MAP_SIZE =((RPCIndex)-1)-1
const int | SLNet::UNDEFINED_RPC_INDEX =((RPCIndex)-1)
const SystemAddress | SLNet::UNASSIGNED_SYSTEM_ADDRESS
| Index of an invalid SystemAddress.
const SystemIndex | SLNet::UNASSIGNED_PLAYER_INDEX = 65535
| Index of an unassigned player.
const NetworkID | SLNet::UNASSIGNED_NETWORK_ID = (uint64_t) -1
| Unassigned object ID.
const int | SLNet::PING_TIMES_ARRAY_SIZE = 5

## Detailed Description

Types used by RakNet, most of which involve user code.

Definition in file types.h.

## Class Documentation

struct SLNet::PublicKey

Passed to RakPeerInterface::Connect()

Definition at line 133 of file types.h.

Class Members
char * | myPrivateKey | (Optional) Pointer to a private key of length cat::EasyHandshake::PRIVATE_KEY_BYTES
char * | myPublicKey | (Optional) Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES
PublicKeyMode | publicKeyMode | How to interpret the public key, see above.
char * | remoteServerPublicKey | Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES. See the Encryption sample.

struct SLNet::Packet

This represents a user message from another system.

Definition at line 434 of file types.h.

Class Members
BitSize_t | bitSize | The length of the data in bits.
unsigned char * | data | The data from the sender.
bool | deleteData |
RakNetGUID | guid | A unique identifier for the system that sent this packet, regardless of IP address (internal / external / remote system) Only valid once a connection has been established (ID_CONNECTION_REQUEST_ACCEPTED, or ID_NEW_INCOMING_CONNECTION) Until that time, will be UNASSIGNED_RAKNET_GUID
unsigned int | length | The length of the data in bytes.
SystemAddress | systemAddress | The system that send this packet.
bool | wasGeneratedLocally |

## Macro Definition Documentation

#define BITS_TO_BYTES | ( |  | x | ) | (((x)+7)>>3)

Given a number of bits, return how many bytes are needed to represent that.

Definition at line 93 of file types.h.

Referenced by SLNet::BitStream::AddBitsAndReallocate(), SLNet::BitStream::AssertCopyData(), SLNet::BitStream::CopyData(), SLNet::HuffmanEncodingTree::DecodeArray(), SLNet::TableSerializer::DeserializeCell(), SLNet::BitStream::GetNumberOfBytesUsed(), SLNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer(), SLNet::BitStream::PadWithZeroToByteLength(), SLNet::RakPeer::ParseConnectionRequestPacket(), SLNet::BitStream::PrintBits(), SLNet::BitStream::ReadBits(), SLNet::RakPeer::RunUpdateCycle(), SLNet::ReliabilityLayer::Send(), SLNet::RakPeer::SendBuffered(), SLNet::ReliabilityLayer::Update(), and SLNet::BitStream::Write().

#define BYTES_TO_BITS | ( |  | x | ) | ((x)<<3)

Definition at line 94 of file types.h.

Referenced by SLNet::PluginInterface2::AllocatePacketUnified(), SLNet::RakPeer::AllocPacket(), SLNet::TableSerializer::DeserializeCell(), SLNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer(), SLNet::BitStream::IgnoreBytes(), SLNet::BitStream::PadWithZeroToByteLength(), SLNet::ProcessOfflineNetworkPacket(), SLNet::BitStream::ReadBitsFromIntegerRange(), SLNet::ReliabilityLayer::Send(), SLNet::RakPeer::SendBufferedList(), SLNet::RakPeer::SendOutOfBand(), SLNet::RakPeer::SendTTL(), SLNet::PluginInterface2::SendUnified(), SLNet::BitStream::SerializeBitsFromIntegerRange(), SLNet::ReliabilityLayer::Update(), SLNet::BitStream::Write(), and SLNet::BitStream::WriteBitsFromIntegerRange().

#define PRINTF_64_BIT_MODIFIER "ll"

Definition at line 108 of file types.h.

Referenced by SLNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer(), SLNet::StatisticsToString(), and SLNet::RakNetGUID::ToString().