mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Microsoft isn't supporting NuGet-components ASP.NET Core ever since 3.x so using Kestrel is out. New implementation is 100% thread pool compared to the old one which was a single specific thread.
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace Robust.Server.Interfaces.ServerStatus
|
|
{
|
|
public delegate bool StatusHostHandler(
|
|
HttpMethod method,
|
|
HttpListenerRequest request,
|
|
HttpListenerResponse response);
|
|
|
|
public interface IStatusHost
|
|
{
|
|
void Start();
|
|
|
|
void AddHandler(StatusHostHandler handler);
|
|
|
|
/// <summary>
|
|
/// Invoked when a client queries a status request from the server.
|
|
/// THIS IS INVOKED FROM ANOTHER THREAD.
|
|
/// I REPEAT, THIS DOES NOT RUN ON THE MAIN THREAD.
|
|
/// MAKE TRIPLE SURE EVERYTHING IN HERE IS THREAD SAFE DEAR GOD.
|
|
/// </summary>
|
|
event Action<JObject> OnStatusRequest;
|
|
|
|
/// <summary>
|
|
/// Invoked when a client queries an info request from the server.
|
|
/// THIS IS INVOKED FROM ANOTHER THREAD.
|
|
/// I REPEAT, THIS DOES NOT RUN ON THE MAIN THREAD.
|
|
/// MAKE TRIPLE SURE EVERYTHING IN HERE IS THREAD SAFE DEAR GOD.
|
|
/// </summary>
|
|
event Action<JObject> OnInfoRequest;
|
|
}
|
|
}
|