bluerein 0 Report post Posted January 1, 2010 Having problems listening to a port... Im running TVersity media streamer on port 41952 on ip 192.168.0.3 , problem is the cpu keep sleeping whilst streaming so basically all im trying to do is check the port to see if its active or not .. tried $g_IP = @IPAddress1 ; 192.168.0.3 -ip of server ; Start The TCP Services ;============================================== TCPStartUp() ; Create a Listening "SOCKET" ;============================================== $MainSocket = TCPConnect($g_IP, 41952) If $MainSocket = -1 Then msgbox(16,"",@error) Else msgbox(16,"","success!!") Endif which should of worked but returns an error of "10013" tried TCPconnect and that worked ok $g_IP = @IPAddress1 ; 192.168.0.3 -ip of server ; Start The TCP Services ;============================================== TCPStartUp() ; Create a Listening "SOCKET" ;============================================== $MainSocket = TCPConnect($g_IP, 41952) If $MainSocket = -1 Then msgbox(16,"","error") Else msgbox(16,"","success!!") Endif but this doesnt help me as the servers running 24/7 so the connection as always there Any ideas or a better way to do it?? Cheers Share this post Link to post Share on other sites
PsaltyDS 27 Report post Posted January 2, 2010 Try opening a command line console and use NETSTAT. You're looking for a connection status of ESTABLISHED. Check it when there is an active connection, and when there isn't to see if you can tell from there. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites