mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-12 22:54:43 +08:00
提交origin2.0版本
This commit is contained in:
1
network/processor/gobprocessor.go
Normal file
1
network/processor/gobprocessor.go
Normal file
@@ -0,0 +1 @@
|
||||
package processor
|
||||
17
network/processor/jsonprocessor.go
Normal file
17
network/processor/jsonprocessor.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package processor
|
||||
|
||||
type JsonProcessor struct {
|
||||
//SetByteOrder(littleEndian bool)
|
||||
//SetMsgLen(lenMsgLen int, minMsgLen uint32, maxMsgLen uint32)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func (slf *JsonProcessor) Unmarshal(data []byte) (interface{}, error) {
|
||||
return nil,nil
|
||||
}
|
||||
|
||||
|
||||
func (slf *JsonProcessor) Marshal(msg interface{}) ([][]byte, error) {
|
||||
return nil,nil
|
||||
}
|
||||
1
network/processor/msgpackprocessor.go
Normal file
1
network/processor/msgpackprocessor.go
Normal file
@@ -0,0 +1 @@
|
||||
package processor
|
||||
11
network/processor/processor.go
Normal file
11
network/processor/processor.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package processor
|
||||
|
||||
type IProcessor interface {
|
||||
//SetByteOrder(littleEndian bool)
|
||||
//SetMsgLen(lenMsgLen int, minMsgLen uint32, maxMsgLen uint32)
|
||||
|
||||
Unmarshal(data []byte) (interface{}, error)
|
||||
// must goroutine safe
|
||||
Marshal(msg interface{}) ([][]byte, error)
|
||||
}
|
||||
|
||||
1
network/processor/protobufprocessor.go
Normal file
1
network/processor/protobufprocessor.go
Normal file
@@ -0,0 +1 @@
|
||||
package processor
|
||||
Reference in New Issue
Block a user