mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-12 22:54:43 +08:00
提交origin2.0版本
This commit is contained in:
10
network/processor.go
Normal file
10
network/processor.go
Normal file
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user