mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-01-14 22:18:43 +00:00
Test debugging code
This commit is contained in:
parent
cd6f877380
commit
79dd44db09
@ -32,6 +32,35 @@ namespace LibMpcTest
|
||||
Process.Start();
|
||||
LogOutput = Process.StandardOutput.ReadToEnd();
|
||||
LogError = Process.StandardError.ReadToEnd();
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
CheckIfServerIsRunning();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckIfServerIsRunning()
|
||||
{
|
||||
var netcat = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "/bin/netstat",
|
||||
WorkingDirectory = "/bin/",
|
||||
Arguments = "-ntpl",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
|
||||
netcat.Start();
|
||||
netcat.WaitForExit();
|
||||
|
||||
Console.Out.WriteLine("netstat:");
|
||||
Console.Out.WriteLine($"out: {netcat.StandardOutput.ReadToEnd()}");
|
||||
Console.Out.WriteLine($"err: {netcat.StandardError.ReadToEnd()}");
|
||||
}
|
||||
|
||||
private Server GetServer()
|
||||
|
Loading…
Reference in New Issue
Block a user