NodeServer.hubAddress

Gets the address of the hub this node is connected to.

class NodeServer
shared pure nothrow @property @trusted @nogc
Address
hubAddress
()

Return Value

Type: Address

the address of the hub connected to, or null if not connected yet

Examples

if(server.hubAddress.toAddrString() == "127.0.0.1") {
   writeln("the hub is ipv4 localhost!");
} else if(server.hubAddress.toAddrString() == "::1") {
   writeln("The hub is ipv6 localhost!");
}

Meta