This commit is contained in:
glax 2024-01-14 00:32:05 +01:00
parent bd41858a17
commit c418bb0460
2 changed files with 2 additions and 4 deletions

View File

@ -33,12 +33,11 @@ public class GSIServer
Console.WriteLine($"[{request.HttpMethod}] {request.Url} - {request.UserAgent}");
HttpResponseMessage responseMessage = new HttpResponseMessage(HttpStatusCode.Accepted);
HttpResponseMessage responseMessage = new (HttpStatusCode.Accepted);
context.Response.OutputStream.Write(Encoding.UTF8.GetBytes(responseMessage.ToString()));
StreamReader reader = new StreamReader(request.InputStream, request.ContentEncoding);
StreamReader reader = new (request.InputStream, request.ContentEncoding);
string content = await reader.ReadToEndAsync();
Console.WriteLine(content);
OnMessage?.Invoke(content);
}
HttpListener.Close();

View File

@ -61,7 +61,6 @@ public class OpenCS2hock
{
string fileName = Path.Combine(Environment.CurrentDirectory, "CS2Events" ,$"{DateTime.Now.ToLongTimeString().Replace(':','.')}.json");
File.WriteAllText(fileName, content);
Console.WriteLine(fileName);
_cs2MessageHandler.HandleCS2Message(content);
}
}