forked from PGR/ascnet
add more logging
This commit is contained in:
parent
f29922c26a
commit
ef5dc6acaa
|
@ -26,14 +26,14 @@ namespace AscNet.GameServer
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
for (; ; )
|
while (true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
listener.Start();
|
listener.Start();
|
||||||
c.Log($"{nameof(GameServer)} started and listening on port {Common.Common.config.GameServer.Port}");
|
c.Log($"{nameof(GameServer)} started and listening on port {Common.Common.config.GameServer.Port}");
|
||||||
|
|
||||||
for (; ; )
|
while (true)
|
||||||
{
|
{
|
||||||
TcpClient tcpClient = listener.AcceptTcpClient();
|
TcpClient tcpClient = listener.AcceptTcpClient();
|
||||||
string id = tcpClient.Client.RemoteEndPoint!.ToString()!;
|
string id = tcpClient.Client.RemoteEndPoint!.ToString()!;
|
||||||
|
|
|
@ -44,12 +44,14 @@ namespace AscNet.SDKServer.Controllers
|
||||||
remoteConfigs.AddConfig("DownloadMethod", 1);
|
remoteConfigs.AddConfig("DownloadMethod", 1);
|
||||||
remoteConfigs.AddConfig("PcPayCallbackList", $"{Common.Common.config.GameServer.Host}/api/XPay/KuroPayResult");
|
remoteConfigs.AddConfig("PcPayCallbackList", $"{Common.Common.config.GameServer.Host}/api/XPay/KuroPayResult");
|
||||||
|
|
||||||
return TsvTool.SerializeObject(remoteConfigs);
|
string serializedObject = TsvTool.SerializeObject(remoteConfigs);
|
||||||
|
SDKServer.c.Log(serializedObject);
|
||||||
|
return serializedObject;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapGet("/prod/client/notice/config/com.kurogame.punishing.grayraven.en.pc/{version}/LoginNotice.json", (HttpContext ctx) =>
|
app.MapGet("/prod/client/notice/config/com.kurogame.punishing.grayraven.en.pc/{version}/LoginNotice.json", (HttpContext ctx) =>
|
||||||
{
|
{
|
||||||
return JsonConvert.SerializeObject(new LoginNotice()
|
LoginNotice notice = new()
|
||||||
{
|
{
|
||||||
BeginTime = 0,
|
BeginTime = 0,
|
||||||
EndTime = 0,
|
EndTime = 0,
|
||||||
|
@ -57,23 +59,30 @@ namespace AscNet.SDKServer.Controllers
|
||||||
Id = "1",
|
Id = "1",
|
||||||
ModifyTime = 0,
|
ModifyTime = 0,
|
||||||
Title = "NOTICE"
|
Title = "NOTICE"
|
||||||
});
|
};
|
||||||
|
string serializedObject = JsonConvert.SerializeObject(notice);
|
||||||
|
SDKServer.c.Log(serializedObject);
|
||||||
|
return serializedObject;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/feedback", (HttpContext ctx) =>
|
app.MapPost("/feedback", (HttpContext ctx) =>
|
||||||
{
|
{
|
||||||
|
SDKServer.c.Log("1");
|
||||||
return "1";
|
return "1";
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapGet("/api/Login/Login", ([FromQuery] int loginType, [FromQuery] int userId, [FromQuery] string token, [FromQuery] string clientIp) =>
|
app.MapGet("/api/Login/Login", ([FromQuery] int loginType, [FromQuery] int userId, [FromQuery] string token, [FromQuery] string clientIp) =>
|
||||||
{
|
{
|
||||||
return JsonConvert.SerializeObject(new LoginGate()
|
LoginGate gate = new()
|
||||||
{
|
{
|
||||||
Code = 0,
|
Code = 0,
|
||||||
Ip = Common.Common.config.GameServer.Host,
|
Ip = Common.Common.config.GameServer.Host,
|
||||||
Port = Common.Common.config.GameServer.Port,
|
Port = Common.Common.config.GameServer.Port,
|
||||||
Token = token
|
Token = token
|
||||||
});
|
};
|
||||||
|
string serializedObject = JsonConvert.SerializeObject(gate);
|
||||||
|
SDKServer.c.Log(serializedObject);
|
||||||
|
return serializedObject;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue