icinga-powershell-framework/lib/webserver/New-IcingaTCPClient.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

21 lines
471 B
PowerShell

function New-IcingaTCPClient()
{
param(
[System.Net.Sockets.TcpListener]$Socket = $null
);
if ($null -eq $Socket) {
return $null;
}
[System.Net.Sockets.TcpClient]$Client = $Socket.AcceptTcpClient();
Write-IcingaDebugMessage -Message (
[string]::Format(
'New incoming client connection for endpoint {0}',
(Get-IcingaTCPClientRemoteEndpoint -Client $Client)
)
);
return $Client;
}