Rewrite IPC from HttpListener to KestrelHttpServer (#898)

* Debug tests

* Update

* Add support for IPCPassword

* Misc

* Misc

* Update

* Misc

* Cut dependencies to bare minimum

* Update

* Update

* Update

* Update

* Add support for websockets

* Cleanup and preparation for merge

* Add missing mapping of / -> index.html

* Add support for custom path + misc

* Misc

* Declare latest compatibility version

* Fix harmless error on /Api/Log websocket disconnect
This commit is contained in:
Łukasz Domeradzki
2018-09-08 00:05:23 +02:00
committed by GitHub
parent 5b667476e4
commit e18c8ffa55
30 changed files with 1550 additions and 1400 deletions

View File

@@ -73,15 +73,6 @@ namespace ArchiSteamFarm {
return cookies.Count > 0 ? (from Cookie cookie in cookies where cookie.Name.Equals(name) select cookie.Value).FirstOrDefault() : null;
}
internal static string GetUnifiedName(this Type type) {
if (type == null) {
ASF.ArchiLogger.LogNullError(nameof(type));
return null;
}
return type.GenericTypeArguments.Length == 0 ? type.FullName : type.Namespace + "." + type.Name + string.Join("", type.GenericTypeArguments.Select(innerType => '[' + innerType.GetUnifiedName() + ']'));
}
internal static uint GetUnixTime() => (uint) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
internal static void InBackground(Action action, bool longRunning = false) {
@@ -185,4 +176,4 @@ namespace ArchiSteamFarm {
internal static string ToHumanReadable(this TimeSpan timeSpan) => timeSpan.Humanize(3, maxUnit: TimeUnit.Year, minUnit: TimeUnit.Second);
}
}
}