RakNet
4.0
|
Exec SQLLite commands over the network. More...
#include <SQLite3ServerPlugin.h>
Public Member Functions | |
virtual bool | AddDBHandle (RakNet::RakString dbIdentifier, sqlite3 *dbHandle, bool dbAutoCreated=false) |
void | RemoveDBHandle (RakNet::RakString dbIdentifier, bool alsoCloseConnection=false) |
virtual PluginReceiveResult | OnReceive (Packet *packet) |
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) |
Exec SQLLite commands over the network.
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
|
virtual |
Associate identifier with dbHandle, so when we get calls to operate on identifier, we use dbhandle If SQLite3_STATEMENT_EXECUTE_THREADED is defined, will start the execution thread the first time a dbHandle is added.
|
virtual |
OnReceive is called for every packet.
[in] | packet | the packet that is being returned to the user |
Reimplemented from RakNet::PluginInterface2.
void RakNet::SQLite3ServerPlugin::RemoveDBHandle | ( | RakNet::RakString | dbIdentifier, |
bool | alsoCloseConnection = false |
||
) |
Stop using a dbHandle, lookup either by identifier or by pointer. If SQLite3_STATEMENT_EXECUTE_THREADED is defined, do not call this while processing commands, since the commands run in a thread and might be using the dbHandle Call before closing the handle or else SQLite3Plugin won't know that it was closed, and will continue using it