icinga-powershell-framework/lib/webserver/Send-IcingaTCPClientMessage.psm1
Lord Hepipud 4ef55bddb4 Fixes lots of code styling, spelling and script analyzer
Disabling UseConsistentIndentation because it is not
properly working for multi-line commands with arguments
and array/hashtable objects
2022-01-14 22:26:53 +01:00

14 lines
355 B
PowerShell

function Send-IcingaTCPClientMessage()
{
param(
[Hashtable]$Message = @{ },
[System.Net.Security.SslStream]$Stream = $null
);
if ($null -eq $Message -Or $Message.Count -eq 0 -Or $Message.length -eq 0) {
return;
}
$Stream.Write($Message.message, 0, $Message.length);
$Stream.Flush();
}