1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-01 16:10:24 +08:00

perf: remove tea encryption

This commit is contained in:
源文雨
2024-07-11 22:31:44 +09:00
parent c0bd86d1bb
commit e115098344
14 changed files with 243 additions and 117 deletions

View File

@@ -121,9 +121,25 @@ func (m *Me) MTU() uint16 {
return m.mtu
}
func (m *Me) CloseNIC() error {
m.nic.Down()
return m.nic.Close()
func (m *Me) EndPoint() net.Addr {
return m.udpep
}
func (m *Me) Close() error {
m.loop = nil
m.connections = nil
_ = m.udpconn.Close()
m.udpconn = nil
m.router = nil
m.recving.Destroy()
m.recving = nil
m.recved.Destroy()
m.recved = nil
if m.nic != nil {
m.nic.Down()
return m.nic.Close()
}
return nil
}
func (m *Me) Write(packet []byte) (n int, err error) {