package nettest
Import Path
vendor/golang.org/x/net/nettest (on golang.org and go.dev)
Dependency Relation
imports 17 packages, and imported by 0 packages
Involved Source Files
conntest.go
d-> nettest.go
nettest_unix.go
Exported Type Names
Exported Values
func
LocalPath() (
string,
error)
LocalPath returns a local path that can be used for Unix-domain
protocol testing.
func
MulticastSource(network
string, ifi *
net.
Interface) (
net.
IP,
error)
MulticastSource returns a unicast IP address on ifi when ifi is an
IP multicast-capable network interface.
The provided network must be "ip", "ip4" or "ip6".
func
NewLocalListener(network
string) (
net.
Listener,
error)
NewLocalListener returns a listener which listens to a loopback IP
address or local file system path.
The provided network must be "tcp", "tcp4", "tcp6", "unix" or
"unixpacket".
func
NewLocalPacketListener(network
string) (
net.
PacketConn,
error)
NewLocalPacketListener returns a packet listener which listens to a
loopback IP address or local file system path.
The provided network must be "udp", "udp4", "udp6" or "unixgram".
func
SupportsIPv4()
bool
SupportsIPv4 reports whether the platform supports IPv4 networking
functionality.
func
SupportsIPv6()
bool
SupportsIPv6 reports whether the platform supports IPv6 networking
functionality.
func
SupportsRawSocket()
bool
SupportsRawSocket reports whether the current session is available
to use raw sockets.
func
TestableAddress(network, address
string)
bool
TestableAddress reports whether address of network is testable on
the current platform configuration.
func
TestableNetwork(network
string)
bool
TestableNetwork reports whether network is testable on the current
platform configuration.
See func Dial of the standard library for the supported networks.
func
TestConn(t *
testing.
T, mp
MakePipe)
TestConn tests that a net.Conn implementation properly satisfies the interface.
The tests should not produce any false positives, but may experience
false negatives. Thus, some issues may only be detected when the test is
run multiple times. For maximal effectiveness, run the tests under the
race detector.
 |
The pages are generated with Golds v0.1.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |