SpoofDPI/net/dial.go
2022-01-12 02:15:45 +09:00

24 lines
379 B
Go

package net
import (
"net"
)
func Listen(network, address string) (Listener, error) {
l, err := net.Listen(network, address)
if err != nil {
return Listener{}, err
}
return Listener{listener: l}, nil
}
func Dial(network, address string) (Conn, error) {
conn, err := net.Dial(network, address)
if err != nil {
return Conn{}, err
}
return Conn{conn: conn}, nil
}