- acquire
void acquire()
Undocumented in source. Be warned that the author may not have intended to support it.
- authenticate
void authenticate(ubyte[] greeting)
Undocumented in source.
- buildAuthPacket
ubyte[] buildAuthPacket(ubyte[] token)
Undocumented in source.
- bumpPacket
void bumpPacket()
Undocumented in source. Be warned that the author may not have intended to support it.
- close
void close()
Explicitly close the connection.
- connect
void connect(SvrCapFlags clientCapabilities)
Undocumented in source.
- consumeServerInfo
void consumeServerInfo(ubyte[] packet)
Undocumented in source. Be warned that the author may not have intended to support it.
- enableMultiStatements
void enableMultiStatements(bool on)
Enable multiple statement commands
- getCmdResponse
OKErrorPacket getCmdResponse(bool asString)
Undocumented in source. Be warned that the author may not have intended to support it.
- getCommonCapabilities
SvrCapFlags getCommonCapabilities(SvrCapFlags server, SvrCapFlags client)
Undocumented in source. Be warned that the author may not have intended to support it.
- getPacket
ubyte[] getPacket()
Undocumented in source. Be warned that the author may not have intended to support it.
- init_connection
void init_connection()
Undocumented in source. Be warned that the author may not have intended to support it.
- isOwner
bool isOwner()
Undocumented in source. Be warned that the author may not have intended to support it.
- makeToken
ubyte[] makeToken(ubyte[] authBuf)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseGreeting
ubyte[] parseGreeting()
Undocumented in source. Be warned that the author may not have intended to support it.
- pingServer
OKErrorPacket pingServer()
- refreshServer
OKErrorPacket refreshServer(RefreshFlags flags)
Refresh some feature(s) of the server.
- release
void release()
Undocumented in source. Be warned that the author may not have intended to support it.
- resetPacket
void resetPacket()
Undocumented in source. Be warned that the author may not have intended to support it.
- selectDB
void selectDB(string dbName)
Select a current database.
- send
void send(ubyte[] packet)
Undocumented in source.
- send
void send(ubyte[] header, ubyte[] data)
Undocumented in source.
- sendCmd
void sendCmd(CommandType cmd, T[] data)
Undocumented in source.
- serverStats
string serverStats()
Get a textual report on the server status.
- setClientFlags
void setClientFlags(SvrCapFlags capFlags)
Undocumented in source. Be warned that the author may not have intended to support it.
A struct representing a database connection.
The Connection is responsible for handshaking with the server to establish authentication. It then passes client preferences to the server, and subsequently is the channel for all command packets that are sent, and all response packets received.
Uncompressed packets consist of a 4 byte header - 3 bytes of length, and one byte as a packet number. Connection deals with the headers and ensures that packet numbers are sequential.
The initial packet is sent by the server - esentially a 'hello' packet inviting login. That packet has a sequence number of zero. That sequence number is the incremented by cliemt and server packets thruogh the handshake sequence.
After login all further sequences are initialized by the client sending a command packet with a zero sequence number, to which the server replies with zero or more packets with sequential sequence numbers.