Jump to content

Search the Community

Showing results for tags 'tcpstartup'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Hi. I'm working on a script to "round robin" through a list of Terminal Servers. the PC's host names are like "PC1", "PC2", "PC3", ... at each site, so I just use the "number suffix" to determine, which TS server shall be tried for *THIS* PC first, 2nd, 3rd (done, no problem). The issue is showing up, when a TS-Server is *NOT* available. Setting opt("tcptimeout",50) doesn't speed up the process, but I don't think, this is autoit related: it always takes quite a number of seconds to get the result, also with several other tools I've tried, that make use of the Win network APIs. So I suspect, that it's the Windows TCP/IP stack, that's the constraint (WinXP SP3 and Win7, x86 and x64). Question: Is there some "CMDline single EXE tool" / "some other approach", to get the up / open / closed status for an IP:TCPport pair instantly? nmap.exe is dependant on several files coming with it's installation (so fileinstall() would have to install quite a bunch of files), and it also doesn't return valuable exit codes representing it's results, otherwise fileinstall() and this line would be my friend: nmap -PS 192.168.188.111 -p 3389 There are quite a lot of very fast GUI IP scanning tools, but I couldn't find one for command line (ab-)use so far. Any suggestions appreciated, as I don't want to re-invent the wheel ;-) Regards, Rudi. Func CheckConnect($_IP, $_Port) Local $Err TCPStartup() ; Set Some reusable info ;-------------------------- Local $ConnectedSocket, $szData Opt("TCPTimeout", 50) ; Initialize a variable to represent a connection ;================================================== $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT specified ;=========================================================== $Socket = TCPConnect($_IP, $_Port) $Err = @error TCPShutdown() If $Err Then Switch $Err Case 1 SetError($Err) Return ("IP-Address invalid: " & $_IP & ":" & $_Port) Case 2 SetError($Err) Return ("Port-Addresse invalid: " & $_IP & ":" & $_Port) Case Else $Ping = Ping($_IP) If $Ping Then SetError($Err) Return ("PING time = " & $Ping & " - unknown error occured: " & $_IP & ":" & $_Port) Else SetError($Err) Return ("host not PINGable! ") EndIf EndSwitch Else Return True EndIf EndFunc ;==>CheckConnect
×
×
  • Create New...