fix: Make Windows network functions public

This commit is contained in:
Marco Cadetg (aider)
2025-05-09 17:04:02 +02:00
parent 34922680b9
commit cbce623585

View File

@@ -134,7 +134,7 @@ impl NetworkMonitor {
}
/// Get process information using netstat command
fn try_netstat_command(connection: &Connection) -> Option<Process> {
pub(super) fn try_netstat_command(connection: &Connection) -> Option<Process> {
let output = Command::new("netstat").args(["-ano"]).output().ok()?;
if output.status.success() {
@@ -200,7 +200,7 @@ fn try_netstat_command(connection: &Connection) -> Option<Process> {
}
/// Try Windows API to get process information
fn try_windows_api(connection: &Connection) -> Option<Process> {
pub(super) fn try_windows_api(connection: &Connection) -> Option<Process> {
// This would require using the Windows API (like GetExtendedTcpTable)
// For simplicity, we'll just return None as a placeholder
// In a real implementation, you'd use the windows crate to make API calls