The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
github.com/anacrolix/mmsg exposes the batching methods from golang.org/x/net/internal/socket, falling back on OSs that don't implement them.
golang.org/x/net does expose the batching APIs but you have to be explicit about whether you're using ipv4 or ipv6, and IDGAF, it shouldn't be exposed like that.
Message.AddrPort reports the sender as a netip.AddrPort, which costs nothing to produce, so a receive allocates nothing at all, batched or not. Message.Addr is a method rather than a field: it builds a net.Addr from AddrPort the first time it's called, and only callers that want one pay for it.
./socket is taken from golang.org/x/net/internal/socket because we need access to the package and it's internal to golang.org/x/net/internal/socket.
./internal/nettest is taken from golang.org/x/net/nettest. I think because ./socket expects it and we don't want to unnecessarily introduce extra dependencies to golang.org/x/net.
The LICENSE file is taken from golang.org/x/net and put into the respective directories sourced from that module.
type Conn struct {
// contains filtered or unexported fields
}
Conn receives datagrams, in batches where the platform can. Its receive methods reuse state
held here, so they aren't safe to call concurrently with each other on one Conn.
type Message struct {
Buffers [][]byte N int// AddrPort is the sender, and costs nothing to report: a netip.Addr holds its bytes inline.// A 4-in-6 address is left mapped, exactly as the kernel reported it. Prefer this to Addr.
AddrPort netip.AddrPort// contains filtered or unexported fields
}
Addr is the sender as a net.Addr, built from AddrPort the first time it's asked for and kept
for later calls. Building it allocates the address and the net.IP inside it, which is why
receiving no longer does: use AddrPort where it will do.