srpc/server.go

34 lines
362 B
Go
Raw Normal View History

2019-10-22 01:32:56 +02:00
package srpc
import (
"sync"
)
const (
AIN uint8 = 0
AOUT uint8 = 1
AINOUT uint8 = 2
)
const (
OK uint8 = 0
ERR uint8 = 1
)
var RESPONSE_HEADER_SIZE = int32(9)
type responseHeader struct {
size int64
status uint8
}
type Server struct {
serviceMap sync.Map
}
func NewServer() *Server {
return &Server{}
}
var DefaultServer = NewServer()