hub_other.go 366 B

12345678910111213141516
  1. // +build !linux,!freebsd
  2. package udp
  3. import (
  4. "github.com/v2fly/v2ray-core/v4/common/net"
  5. )
  6. func RetrieveOriginalDest(oob []byte) net.Destination {
  7. return net.Destination{}
  8. }
  9. func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) {
  10. nBytes, addr, err := conn.ReadFromUDP(payload)
  11. return nBytes, 0, 0, addr, err
  12. }