mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-16 09:24:47 +08:00
1.新增yml文件支持
2.优化网络模块日志 3.新增类型转换函数
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"math"
|
||||
)
|
||||
|
||||
// --------------
|
||||
// MsgParser --------------
|
||||
// | len | data |
|
||||
// --------------
|
||||
type MsgParser struct {
|
||||
@@ -20,7 +20,7 @@ type MsgParser struct {
|
||||
bytespool.IBytesMemPool
|
||||
}
|
||||
|
||||
func (p *MsgParser) getMaxMsgLen(lenMsgLen int) uint32 {
|
||||
func (p *MsgParser) getMaxMsgLen() uint32 {
|
||||
switch p.LenMsgLen {
|
||||
case 1:
|
||||
return math.MaxUint8
|
||||
@@ -134,4 +134,4 @@ func (p *MsgParser) GetRecyclerReaderBytes() func(data []byte) {
|
||||
return func(data []byte) {
|
||||
p.IBytesMemPool.ReleaseBytes(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user