public async Task ListenAllConnectedAsync() { var hostnames = await HostNameProvider.GetConnectedHostsAsync(); if (hostnames.Count == 0) { if (NetworkNotAvailable != null) { NetworkNotAvailable(this, null); } return; } foreach (var host in hostnames) { await server.BindPortAsync(host, SHUB_PORT); } await server.BindPortAsync(HostNameProvider.GetLoopbackHost(), SHUB_PORT); }
public async Task ConnectViaLoopbackAsync() { await ConnectAsync(HostNameProvider.GetLoopbackHost().CanonicalName); }
public async Task ListenViaLoopbackAsync() { await server.BindPortAsync(HostNameProvider.GetLoopbackHost(), SHUB_PORT); }