blob: 545cd718e0cd1a9ceb1905e18ac85f3b8855ab1d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package proto
//go:generate go run github.com/dmarkham/enumer -type ClientCode -trimprefix ClientCode -output client_code_enum.go
// ClientCode is sent from client to server.
type ClientCode byte
// Possible client codes.
const (
ClientCodeHello ClientCode = 0 // client part of "handshake"
ClientCodeQuery ClientCode = 1 // query start
ClientCodeData ClientCode = 2 // data block (can be compressed)
ClientCodeCancel ClientCode = 3 // query cancel
ClientCodePing ClientCode = 4 // ping request to server
ClientTablesStatusRequest ClientCode = 5 // tables status request
)
// Encode to buffer.
func (c ClientCode) Encode(b *Buffer) { b.PutByte(byte(c)) }
|