RakNet  4.0
Public Member Functions | List of all members
RakNet::SQLite3ClientPlugin Class Reference

#include <SQLite3ClientPlugin.h>

Inheritance diagram for RakNet::SQLite3ClientPlugin:
RakNet::PluginInterface2

Public Member Functions

void AddResultHandler (SQLite3PluginResultInterface *res)
 
unsigned int _sqlite3_exec (RakNet::RakString dbIdentifier, RakNet::RakString inputStatement, PacketPriority priority, PacketReliability reliability, char orderingChannel, const SystemAddress &systemAddress)
 
virtual PluginReceiveResult OnReceive (Packet *packet)
 
- Public Member Functions inherited from RakNet::PluginInterface2
virtual void OnAttach (void)
 Called when the interface is attached.
 
virtual void OnDetach (void)
 Called when the interface is detached.
 
virtual void Update (void)
 Update is called every time a packet is checked for .
 
virtual void OnRakPeerStartup (void)
 Called when RakPeer is initialized.
 
virtual void OnRakPeerShutdown (void)
 Called when RakPeer is shutdown.
 
virtual void OnClosedConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason)
 
virtual void OnNewConnection (const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming)
 
virtual void OnFailedConnectionAttempt (Packet *packet, PI2_FailedConnectionAttemptReason failedConnectionAttemptReason)
 
virtual bool UsesReliabilityLayer (void) const
 
virtual void OnDirectSocketSend (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
 
virtual void OnDirectSocketReceive (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
 
virtual void OnReliabilityLayerNotification (const char *errorMessage, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress, bool isError)
 
virtual void OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time, int isSend)
 
virtual void OnAck (unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time)
 
virtual void OnPushBackPacket (const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress)
 

Detailed Description

SQLite version 3 supports remote calls via networked file handles, but not over the regular internet This plugin will serialize calls to and results from sqlite3_exec That's all it does - any remote system can execute SQL queries. Intended as a starting platform to derive from for more advanced functionality (security over who can query, etc). Compatible as a plugin with both RakPeerInterface and PacketizedTCP

Member Function Documentation

unsigned int RakNet::SQLite3ClientPlugin::_sqlite3_exec ( RakNet::RakString  dbIdentifier,
RakNet::RakString  inputStatement,
PacketPriority  priority,
PacketReliability  reliability,
char  orderingChannel,
const SystemAddress systemAddress 
)

Execute a statement on the remote system

Note
Don't forget to escape your input strings. RakString::SQLEscape() is available for this.
Parameters
[in]dbIdentifierWhich database to use, added with AddDBHandle()
[in]inputStatementSQL statement to execute
[in]prioritySee RakPeerInterface::Send()
[in]reliabilitySee RakPeerInterface::Send()
[in]orderingChannelSee RakPeerInterface::Send()
[in]systemAddressSee RakPeerInterface::Send()
Returns
Query ID. Will be returned in _sqlite3_exec
void RakNet::SQLite3ClientPlugin::AddResultHandler ( SQLite3PluginResultInterface res)

Add an interface to get callbacks for results Up to user to make sure the pointer is valid through the lifetime of use

virtual PluginReceiveResult RakNet::SQLite3ClientPlugin::OnReceive ( Packet packet)
virtual

OnReceive is called for every packet.

Parameters
[in]packetthe packet that is being returned to the user
Returns
True to allow the game and other plugins to get this message, false to absorb it

Reimplemented from RakNet::PluginInterface2.


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