v6Only property

bool v6Only
read / write

Indicates how a bindAddress value of InternetAddress.anyIPv6 treats IPv4 addresses.

The default is false, which means it listens to any IPv4 and any IPv6 addresses.

If set to true, it only listens on any IPv6 address. That is, it will not listen on any IPv4 address.

This value has no effect if the bindAddress is not InternetAddress.anyIPv6. Therefore, it is not possible to listen on both IPv4 and IPv6 loop-back addresses at the same time (not without also listening on every IPv4 and IPv6 address too).

Implementation

bool v6Only = false