27 lines
679 B
Go
27 lines
679 B
Go
// Package navicat implements the Navicat HTTP Tunnel protocol used by
|
|
// ntunnel_mysql.php (script version 206 in this repository).
|
|
//
|
|
// Every request is stateless: the PHP script opens a new MySQL connection,
|
|
// runs actn=C or actn=Q, and disconnects. See docs/PROTOCOL.md.
|
|
package navicat
|
|
|
|
const (
|
|
Magic uint32 = 1111
|
|
Version202 uint16 = 202
|
|
Version206 uint16 = 206
|
|
HeaderSize = 16
|
|
|
|
ActionConnect = "C"
|
|
ActionQuery = "Q"
|
|
|
|
ErrnoUnsupportedPHP uint32 = 201
|
|
ErrnoInvalidParams uint32 = 202
|
|
ErrnoMySQLMissing uint32 = 203
|
|
ErrnoInvalidToken uint32 = 204
|
|
|
|
sepMore byte = 0x01
|
|
sepLast byte = 0x00
|
|
markLong byte = 0xFE
|
|
markNull byte = 0xFF
|
|
)
|