processor.go 290 B

1234567891011
  1. package network
  2. //Processor 消息解析路由
  3. type Processor interface {
  4. // must goroutine safe
  5. Route(msg interface{}, userData interface{}) error
  6. // must goroutine safe
  7. Unmarshal(data []byte) (interface{}, error)
  8. // must goroutine safe
  9. Marshal(msg interface{}) ([][]byte, error)
  10. }