MCPcopy
hub / github.com/MetaCubeX/mihomo / WaitReadFrom

Method WaitReadFrom

transport/shadowsocks/shadowaead/packet.go:98–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98func (c *PacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, err error) {
99 data, put, addr, err = c.EnhancePacketConn.WaitReadFrom()
100 if err != nil {
101 return
102 }
103 data, err = Unpack(data[c.Cipher.SaltSize():], data, c)
104 if err != nil {
105 if put != nil {
106 put()
107 }
108 data = nil
109 put = nil
110 return
111 }
112 return
113}

Callers

nothing calls this directly

Calls 3

UnpackFunction · 0.70
WaitReadFromMethod · 0.65
SaltSizeMethod · 0.65

Tested by

no test coverage detected