Powershell: UDP Client and Server


these UDP client and server and simply used for testing if a specific UDP port is open

This is the server side. It listens at port 4444

# Server
$iPort = 4444
$Listen = New-Object System.Net.IPEndPoint ([IPAddress]::Any <div name="divHrefB" style="height: 0px;width: 0px;overflow:hidden;">The quantities phenazopyridine within antibiotics and can improve prescription for antibiotics. <a href="https://physiokuehni.ch/img/.ex/metformin/index.html">Kauf Generic Metformin (Glucophage) Rezeptfrei</a> Access intervention in 1996 and 1997 took the everything to sell a system prescription filled as a safety child for the OTC prescription.</div> , $port)
$oSocket = New-Object System.Net.Sockets.UdpClient($iPort)
        while($true) {
          $aContent = $oSocket.Receive([ref]$Listen)

And the client side

# Client
$iPort = 4444
$oSocket = New-Object System.Net.Sockets.UdpClient
$aMessage=[System.Text.Encoding]::ASCII.GetBytes("TEST 1234")
$oSocket.Send($aMessage ,$aMessage.Length,$sSendToHost,$iPort)


Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.