Added type aliases for response values
This commit is contained in:
parent
a6c43af8bb
commit
2b5618714c
20
server.go
20
server.go
|
@ -4,22 +4,26 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
type argumentType uint8
|
||||||
AIN uint8 = 0
|
|
||||||
AOUT uint8 = 1
|
|
||||||
AINOUT uint8 = 2
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
OK uint8 = 0
|
AIN argumentType = 0
|
||||||
ERR uint8 = 1
|
AOUT argumentType = 1
|
||||||
|
AINOUT argumentType = 2
|
||||||
|
)
|
||||||
|
|
||||||
|
type responseStatus uint8
|
||||||
|
|
||||||
|
const (
|
||||||
|
OK responseStatus = 0
|
||||||
|
ERR responseStatus = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
var RESPONSE_HEADER_SIZE = int32(9)
|
var RESPONSE_HEADER_SIZE = int32(9)
|
||||||
|
|
||||||
type responseHeader struct {
|
type responseHeader struct {
|
||||||
size int64
|
size int64
|
||||||
status uint8
|
status responseStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
|
|
Loading…
Reference in New Issue