duncan
Mom and Dad were wrong!
Classes | Typedefs | Variables
net Namespace Reference

Classes

class  Connection
struct  Packet
 Represents a packet to be sent over the network. More...
class  PacketListener

Typedefs

typedef enet_uint16 port_t
 type for port numbers
typedef enet_uint16 index_t
 type for peer indices
typedef enet_uint8 data_t
 type for packet data
typedef enet_uint16 pos_t
 type for positions
typedef enet_uint8 dir_t
 type for directions
typedef enet_uint32 maphash_t
 type for map hashes

Variables

const size_t kMaxUsers = 1337
 maximum simultaneously connected clients per server
const size_t kMaxCharacters = 1337
 maximum characters (including NPCs) per world
const size_t kNumChannels = 1
 how many channels of network traffic
const bool kReliable = true
 flag for ensuring a packet arrives at its destination
const port_t kPort = 13370
 port used by game network traffic
const enet_uint32 kConnectTimeout = 5000
 how long (milliseconds) to try to connect to a server
const size_t kMaxPacketSize = 2048
 maximum bytes of user data to be sent in a single packet
const size_t kViewRange = 10
 maximum `distance' a player can see
const size_t kMaxFrameSize = 3000
const double kTolerance = 0.8
 minimum squared distance two players may be from one another

Detailed Description

Constants and typedefs for network subsystem.

Author:
Malcolm Gill

see LICENSE


Variable Documentation

const size_t net::kMaxFrameSize = 3000

maximum bytes of data to be sent (for all clients/worlds) in a server frame

Note:
server can hang if kMaxFrameSize < kMaxPacketSize
 All Classes Namespaces Functions Variables Typedefs Enumerations