Inherits Garbage. Inherited by PgBind, PgCancel, PgCopyData, PgCopyDone, PgCopyFail, PgDescribe, PgExecute, PgFlush, PgParse, PgPasswordMessage, PgQuery, PgStartup, PgSync and PgTerminate.
An abstract base class for PostgreSQL frontend messages.
We treat client messages like server messages, dedicating a subclass to each message type. The subclass is expected to provide accessors to set the message fields, and an encodeData function that uses the appendByte/appendInt32 and other functions to assemble the encoded message. The base class prepends the message type and length.
The message is sent by enqueue()ing it to a write buffer.
Creates a new PgClientMessage of type t.
Appends a single byte c to the message data.
Appends the bytes from s to the message data.
Appends n to the message data as a 16-bit integer in network byte order.
Appends n to the message data as a 32-bit integer in network byte order.
Appends s to the message data as a NUL-terminated string.
Every PgClientMessage subclass must implement this function, which is used by enqueue() to encode the type-specific part of messages.
Assembles a message, and appends the resulting packet (type, length, data) to buf. It relies on subclasses to "encodeData()" properly.
This virtual destructor exists only for safe subclassing.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.