mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-07-14 03:46:58 +00:00
Добавил получение количества tcp и udp соединений
This commit is contained in:
@@ -48,4 +48,17 @@ public class MonitorController(
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
|
||||
[HttpGet("connections")]
|
||||
public async Task<ActionResult> GetConnectionsCountAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
var count = await monitorService.GetConnectionsCountAsync(cancellationToken);
|
||||
var response = new ConnectionsResponse
|
||||
{
|
||||
Tcp = count.TcpCount,
|
||||
Udp = count.UdpCount
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user