aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-23 13:37:31 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-23 13:37:31 -0500
commit8d0c182748158a5a954ad9efc1f237c63eafb681 (patch)
tree8ce1fcce9f65d1f20b45e32ac7c2b69a85abc6c8 /src
parentdbca62ae931f9a0e9082c274bfbe9c4c76048cff (diff)
downloadslskd-8d0c182748158a5a954ad9efc1f237c63eafb681.tar.gz
add LocalHostName
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Network/NetworkService.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/slskd/Network/NetworkService.cs b/src/slskd/Network/NetworkService.cs
index 265e5526..792be99c 100644
--- a/src/slskd/Network/NetworkService.cs
+++ b/src/slskd/Network/NetworkService.cs
@@ -38,6 +38,11 @@ namespace slskd.Network
ReadOnlyDictionary<Guid, (TaskCompletionSource<Stream> Stream, TaskCompletionSource Completion)> PendingFileUploads { get; }
/// <summary>
+ /// Gets the name of the local host.
+ /// </summary>
+ string LocalHostName { get; }
+
+ /// <summary>
/// Gets the collection of registered Agents.
/// </summary>
ReadOnlyCollection<Agent> RegisteredAgents { get; }
@@ -163,6 +168,11 @@ namespace slskd.Network
/// </summary>
public ReadOnlyCollection<Agent> RegisteredAgents => RegisteredAgentDictionary.Values.Select(v => v.Agent).ToList().AsReadOnly();
+ /// <summary>
+ /// Gets the name of the local host.
+ /// </summary>
+ public string LocalHostName => "local";
+
private ILogger Log { get; } = Serilog.Log.ForContext<NetworkService>();
private MemoryCache MemoryCache { get; } = new MemoryCache(new MemoryCacheOptions());
private IHubContext<NetworkHub, INetworkHub> NetworkHub { get; set; }