Files
origin/network/processor.go
2020-03-28 12:02:22 +08:00

12 lines
258 B
Go

package network
type Processor interface {
// must goroutine safe
Route(msg interface{}, userData interface{}) error
// must goroutine safe
Unmarshal(data []byte) (interface{}, error)
// must goroutine safe
Marshal(msg interface{}) ([]byte, error)
}