mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-29 23:30:37 +08:00
优化代码结构
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user