Contenidos
Servidor que recibe el sonido (Beep)
1 2 3 4 5 6 7 8 |
## Server $ip = New-Object System.Net.IPEndPoint ([IPAddress]::Loopback,0) $udp = New-Object System.Net.Sockets.UdpClient 2020 [Text.Encoding]::ASCII.GetString($udp.Receive([ref]$ip)) | iex $udp.Close() |
Cliente que envía el sonido (Beep)
1 2 3 4 5 6 7 8 9 10 |
## Cliente $ip = New-Object System.Net.IPEndPoint ([IPAddress]::Loopback,2020) $udp = New-Object System.Net.Sockets.UdpClient $mensaje = [Text.Encoding]::ASCII.GetBytes('[System.Console]::Beep(1000,100)') $udp.Send($mensaje,$mensaje.length,$ip) | Out-Null $udp.Close() |
Cliente que envía varios sonidos (Beep)
1 2 3 4 5 6 7 8 9 10 |
## Cliente $ip = New-Object System.Net.IPEndPoint ([IPAddress]::Loopback,2020) $udp = New-Object System.Net.Sockets.UdpClient $mensaje = [Text.Encoding]::ASCII.GetBytes('[System.Console]::Beep(1000,100);[System.Console]::Beep(1000,100);') $udp.Send($mensaje,$mensaje.length,$ip) | Out-Null $udp.Close() |