Xray-core/common/net/system.go

84 lines
1.2 KiB
Go
Raw Permalink Normal View History

2020-11-25 11:01:53 +00:00
package net
import "net"
// DialTCP is an alias of net.DialTCP.
2021-10-19 16:57:14 +00:00
var (
DialTCP = net.DialTCP
DialUDP = net.DialUDP
DialUnix = net.DialUnix
Dial = net.Dial
)
2020-11-25 11:01:53 +00:00
type ListenConfig = net.ListenConfig
2021-10-19 16:57:14 +00:00
var (
Listen = net.Listen
ListenTCP = net.ListenTCP
ListenUDP = net.ListenUDP
ListenUnix = net.ListenUnix
)
2020-11-25 11:01:53 +00:00
var LookupIP = net.LookupIP
var FileConn = net.FileConn
// ParseIP is an alias of net.ParseIP
var ParseIP = net.ParseIP
var SplitHostPort = net.SplitHostPort
var CIDRMask = net.CIDRMask
2021-10-19 16:57:14 +00:00
type (
Addr = net.Addr
Conn = net.Conn
PacketConn = net.PacketConn
)
2020-11-25 11:01:53 +00:00
2021-10-19 16:57:14 +00:00
type (
TCPAddr = net.TCPAddr
TCPConn = net.TCPConn
)
2020-11-25 11:01:53 +00:00
2021-10-19 16:57:14 +00:00
type (
UDPAddr = net.UDPAddr
UDPConn = net.UDPConn
)
2020-11-25 11:01:53 +00:00
2021-10-19 16:57:14 +00:00
type (
UnixAddr = net.UnixAddr
UnixConn = net.UnixConn
)
2020-11-25 11:01:53 +00:00
// IP is an alias for net.IP.
2021-10-19 16:57:14 +00:00
type (
IP = net.IP
IPMask = net.IPMask
IPNet = net.IPNet
)
const (
IPv4len = net.IPv4len
IPv6len = net.IPv6len
)
type (
Error = net.Error
AddrError = net.AddrError
)
type (
Dialer = net.Dialer
Listener = net.Listener
TCPListener = net.TCPListener
UnixListener = net.UnixListener
)
var (
ResolveUnixAddr = net.ResolveUnixAddr
ResolveUDPAddr = net.ResolveUDPAddr
)
2020-11-25 11:01:53 +00:00
type Resolver = net.Resolver