1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-29 23:30:37 +08:00

优化代码结构

This commit is contained in:
fumiama
2022-01-01 23:09:59 +08:00
parent 5dc4bf8cad
commit 7dbf8d8729
10 changed files with 175 additions and 222 deletions

View File

@@ -10,6 +10,11 @@ import (
"github.com/sirupsen/logrus"
)
// Read 从 peer 收包
func (l *Link) Read() *head.Packet {
return <-l.pipe
}
func (m *Me) initrecvpool() {
if m.recving == nil {
m.recving = make(map[[32]byte]*head.Packet, 128)