mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-08 02:05:31 -05:00
Fix UDP reading on Windows
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package udp
|
||||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
@@ -32,3 +33,7 @@ func RetrieveOriginalDest(oob []byte) v2net.Destination {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) {
|
||||
return conn.ReadMsgUDP(payload, oob)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user