Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Why my UDP client never receive answer from server?

$
0
0
Hello.

I am trying to communicate with udp server. Problem is that my script never receives answer from server. At first I thought packet must be invalid but after playing around with Wireshark I figured that server actually responds but my script never shows that. Anyone got suggestions/ideas about what might cause this.

[ autoit ]         
; Start The UDP Services ;============================================== UDPStartup() ; Register the cleanup function. OnAutoItExitRegister("Cleanup") ; Open a "SOCKET" ;============================================== Local $socket = UDPOpen("1.2.3.4", 1234) If @error <> 0 Then Exit Local $n = 0 UDPSend($socket,binary("0xAC152D0A")) While 1     Local $data = UDPRecv($socket, 4096)     If @error Then Exit     If $data <> "" Then         ConsoleWrite(Binary($data)&@CRLF)     EndIf WEnd Func Cleanup()     UDPCloseSocket($socket)     UDPShutdown() EndFunc   ;==>Cleanup

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>