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

Check if port is open to WAN

$
0
0
Hello, I need to check if a port is open to wan or not, for a P2P messenger I am developing, I was able to write up a small snipplet of code that should work, but seems to always return 1 even if the port is not open over WAN(forwarded).
 
Anyone take a gander at what I'm doing wrong?
func _checkport($port = 71337) $test = UDPBind("0.0.0.0", $port) $ip = _GetIP() $socket = UDPOpen($ip, $port) If $socket[0] <> 0 Then return 1 Else Return 0 EndIf UDPCloseSocket($test) UDPCloseSocket($socket) EndFunc

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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