SocketAddress.localhost

Provides the set of addresses to listen on all supported protocols on the machine for the given interfaces. localhost only listens on the loopback interface, whereas allInterfaces will listen on loopback as well as the others on the system (meaning it may be publicly exposed to the internet).

If you provide a buffer, I recommend using one of length two, so SocketAddress[2], since this usually provides one address for ipv4 and one for ipv6.

struct SocketAddress
static
localhost
(
ushort port
,)

Meta