Client Function List

Refer to RakClientInterface.h in /LibrarySource for a detailed explanation of each function. Core Functions - Functions needed by all users bool Connect(char* host, unsigned short serverPort, unsigned short clientPort, unsigned long connectionValidationInteger, bool highPriorityThreads, int maxAvePPS, int timeoutTimeMS); void Disconnect(void); void InitializeSecurity(char *privKeyP, char *privKeyQ); void SetPassword(char *_password); bool Send(char *data, const long length, PacketPriority priority, PacketReliability reliability, char orderingStream); bool Send(BitStream* bitStream, PacketPriority priority, PacketReliability reliability, char orderingStream); Packet* Receive(void); void DeallocatePacket(Packet *packet); bool IsConnected(void) const; void PushBackPacket(Packet *packet); Player Management Functions - Tells you your playerId PlayerID GetPlayerID(void) const; Ping Functions - Functions dealing with the automatic ping mechanism void PingServer(void); void PingServer(char* host, unsigned short serverPort, unsigned short clientPort); int GetAveragePing(void); int GetLastPing(void) const; int GetLowestPing(void) const; int GetPlayerPing(PlayerID playerId); void StartOccasionalPing(void); void StopOccasionalPing(void); Compression Functions - Functions to generate a compression layer bool GenerateCompressionLayer(unsigned long inputFrequencyTable[256], bool inputLayer); bool DeleteCompressionLayer(bool inputLayer); bool GetSendFrequencyTable(unsigned long outputFrequencyTable[256]); float GetCompressionRatio(void) const; float GetDecompressionRatio(void) const; Remote Procedure Call Functions - Functions to initial and perform RPC void RegisterAsRemoteProcedureCall(char* uniqueID, void (*functionName)(char *input, int numberOfBitsOfData, PlayerID sender)); void UnregisterAsRemoteProcedureCall(char* uniqueID); bool RPC(char* uniqueID, char *data, long bitLength, PacketPriority priority, PacketReliability reliability, char orderingStream); bool RPC(char* uniqueID, BitStream *parameters, PacketPriority priority, PacketReliability reliability, char orderingStream); bool HandleRPCPacket(Packet* packet); Static Data Functions - Functions dealing with API defined synchronized memory BitStream* GetStaticServerData(void); void SetStaticServerData(char *data, const long length); BitStream* GetStaticClientData(PlayerID playerId); void SetStaticClientData(PlayerID playerId, char *data, const long length); void SendStaticClientDataToServer(void); Network Functions - Functions dealing with the network in general bool SetMTUSize(int size); void AdvertiseSystem(char *host, unsigned short remotePort); void AllowConnectionResponseIPMigration(bool allow); Statistical Functions - Functions dealing with API performance double GetPacketlossPercentile(void); unsigned long GetTransmittedPacketCount(void); unsigned long GetTransmittedFrameCount(void); unsigned long GetLostPacketCount(void); unsigned long GetReceivedPacketCount(void); unsigned long GetBytesSent(void); unsigned long GetBytesReceived(void); unsigned long GetUnacknowledgedSentPacketListSize(void); unsigned long GetBytesSentPerSecond(void) const; unsigned long GetBytesReceivedPerSecond(void) const; unsigned long GetMaximumWindowSize(void); unsigned long GetPacketOutputBufferSize(void); unsigned long GetConnectionTime(void);

See Also

Index Server Function List Peer Function List