icinga-powershell-framework/lib/webserver/Close-IcingaTCPSocket.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

19 lines
340 B
PowerShell

function Close-IcingaTCPSocket()
{
param(
[System.Net.Sockets.TcpListener]$Socket = $null
);
if ($null -eq $Socket) {
return;
}
Write-IcingaDebugMessage -Message (
[string]::Format(
'Closing TCP socket {0}',
$Socket.LocalEndpoint
)
);
$Socket.Stop();
}