mirror of
https://github.com/fumiama/WireGold.git
synced 2026-07-01 16:10:24 +08:00
优化代码结构
This commit is contained in:
@@ -92,7 +92,10 @@ func NewMe(cfg *MyConfig) (m Me) {
|
||||
m.srcport = cfg.SrcPort
|
||||
m.dstport = cfg.DstPort
|
||||
m.mtu = cfg.MTU & 0xfff8
|
||||
m.initrecvpool()
|
||||
if m.writer == nil {
|
||||
m.writer = helper.SelectWriter()
|
||||
}
|
||||
m.recving = ttl.NewCache[[32]byte, *head.Packet](time.Second * 128)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user