Function SocketAddress.ip4

Returns a single address object for the given protocol and parameters.

static SocketAddress ip4(
  scope const(char[]) address,
  ushort port,
  bool forListening = false
);

static SocketAddress ip4(
  ushort port
);

You probably should generally prefer [get], [localhost], or [allInterfaces] to have more flexible code.