Jump to content
Sign in to follow this  
Ascend4nt

Network Interface Info, Statistics, and Traffic

Recommended Posts

Works on 7 x64. Thanks for sharing.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites

Thanks for the tests.  Btw, my 'splash window' height calculations aren't very scientific as you've seen from my other thread. :unsure:


Share this post


Link to post
Share on other sites

Ok, fine.  I'm never happy leaving things looking halfway done.  Now I've added IP and ICMP statistics.  See 1st post. Oh, and ICMP doesn't change that often - to force an increase, do a 'ping' from the command prompt.


Share this post


Link to post
Share on other sites

The splash screen is OK this time. I tested the new version and pinged a machine, it registered the packet being sent with your UDF.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites

I've update this UDF with a bunch of more information.  Network adapters and interfaces are now queryable. Arrays of information about each network interface are now returned from certain functions.  Inside the arrays are indexes which can be used to query network statistics for each network interface.

This is a pretty big change from my first version of Network Statistics (I call it version 2!), so if anyone inquires about it, I could upload the old version again.  However, I plan to split the main UDF from the example in the future.

Updates:

2013-07-02:

 Fixed: indexing, updated and enhanced output

 Changed: Various functions return arrays even if failure - this is to make XP pre-SP1 and also collection of IPv6 less troublesome. @error should still be checked on return though!

 Added: Adapter and Interface information and statistics collection

See the first post


Share this post


Link to post
Share on other sites

I'm getting an error:

C:\_Downloads\NetworkStatistics.au3 (1267) : ==> Subscript used with non-Array variable.:
ConsoleWrite("Interface #"&$i+1&" Entry Info: [0] Interface Index = " & $aNIEntryInfo[0] & ", [1] Interface Type = " & $aNIEntryInfo[1] & ", ...
ConsoleWrite("Interface #"&$i+1&" Entry Info: [0] Interface Index = " & $aNIEntryInfo^ ERROR

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

UEZ, thanks.. can you insert this line after the call to _Network_InterfaceInfo() and tell me what it reports?:

ConsoleWrite("_Network_InterfaceEntryInfo return, @error = " & @error & ", @extended = " & @extended & @CRLF)

Also, is there information reported to the console from the call to _Network_IPAllAddressTable() on?  I've tested this so far in 3 different VM environments, so I was hopeful.. <_<


Share this post


Link to post
Share on other sites

That is really really peculiar.  There's nothing in the documentation for GetIfEntry that mentions ERROR_FILE_NOT_FOUND (2), and in light of what the function does it really makes no sense to give that specific error.

I also asked if you had any console output from the call to _Network_IPAllAddressTable() onwards.  It seems it must return an array if it doesn't crash until _Network_InterfaceInfo()..  does the data look valid? Perhaps adding that ConsoleWrite() debug message after a call to that function could help as well.

The only thing I can guess right now is that there's an index # that isn't matching up somewhere..

thanks again for your help


Share this post


Link to post
Share on other sites

This is the complete output:

IP [IPv4] Stats: [0]  = IP Forwarding Status: [1 = Enabled, 2 = Disabled] : 2, [1]  = Default initial time-to-live (TTL) for datagrams : 64
, [2]  = # Received Datagrams : 97579, [3]  = # Received Datagrams w/Header errors : 0, [4]  = # Received Datagrams w/Address errors : 14
, [5]  = # Forwarded Datagrams : 0, [6]  = # Received Datagrams w/Unknown Protocol : 0, [7]  = # Received Datagrams Discarded : 366
, [8]  = # Received Datagrams Delivered : 99864, [9]  = # Requested Outgoing Datagrams : 79017, [10] = # Outgoing Datagrams Discarded : 0
, [11] = # Transmitted Datagrams Discarded : 0, [12] = # Datagrams w/o Routes that were Discarded : 0, [13] = TimeOut for Reassembling Incoming Fragmented Datagrams : 60
, [14] = # Datagrams Requiring Reassembly : 0, [15] = # Datagrams Successfully Reassembled : 0, [16] = # Datagrams that Failed to be Reassembled : 0
, [17] = # Datagrams that were Fragmented Successfully : 0, [18] = # Datagrams not Fragmented, and Discarded : 0, [19] = # Fragments created (for Datagrams) : 0
, [20] = # of Interfaces : 6, [21] = # of IP addresses associated with PC : 43, [22] = # of Routes in the Routing table : 14
-----------------------------------------
IP [IPv6] Stats: [0]  = IP Forwarding Status: [1 = Enabled, 2 = Disabled] : 2, [1]  = Default initial time-to-live (TTL) for datagrams : 128
, [2]  = # Received Datagrams : 0, [3]  = # Received Datagrams w/Header errors : 0, [4]  = # Received Datagrams w/Address errors : 0
, [5]  = # Forwarded Datagrams : 0, [6]  = # Received Datagrams w/Unknown Protocol : 0, [7]  = # Received Datagrams Discarded : 111
, [8]  = # Received Datagrams Delivered : 0, [9]  = # Requested Outgoing Datagrams : 800, [10] = # Outgoing Datagrams Discarded : 0
, [11] = # Transmitted Datagrams Discarded : 0, [12] = # Datagrams w/o Routes that were Discarded : 8, [13] = TimeOut for Reassembling Incoming Fragmented Datagrams : 60
, [14] = # Datagrams Requiring Reassembly : 0, [15] = # Datagrams Successfully Reassembled : 0, [16] = # Datagrams that Failed to be Reassembled : 0
, [17] = # Datagrams that were Fragmented Successfully : 0, [18] = # Datagrams not Fragmented, and Discarded : 0, [19] = # Fragments created (for Datagrams) : 0
, [20] = # of Interfaces : 10, [21] = # of IP addresses associated with PC : 30, [22] = # of Routes in the Routing table : 13
-----------------------------------------
TCP [IPv4] Stats:[0] Rto Algorithm = 3,[1] Rto Min = 10,[2] Rto Max = 4294967295,[3] #Max Connections = 4294967295,[4] #Active Opens = 1656,[5] #Passive Opens = 17
 [6] #Failed Connection Attempts = 1508,[7] #Established Connections that were Reset = 359,[8] #Established Connections [current] = 26
 [9] #Recvd Segments = 95689,[10] #Sent Segments = 73938,[11] #Retransmitted Segments = 3735
 [12] #Receive Errors = 0,[13] #Sent Segments with Reset Flag = 2058,[14] #Connections = 87
-----------------------------------------
TCP [IPv6] Stats:[0] Rto Algorithm = 3,[1] Rto Min = 10,[2] Rto Max = 4294967295,[3] #Max Connections = 4294967295,[4] #Active Opens = 0,[5] #Passive Opens = 0
 [6] #Failed Connection Attempts = 0,[7] #Established Connections that were Reset = 0,[8] #Established Connections [current] = 0
 [9] #Recvd Segments = 0,[10] #Sent Segments = 0,[11] #Retransmitted Segments = 0
 [12] #Receive Errors = 0,[13] #Sent Segments with Reset Flag = 0,[14] #Connections = 59
-----------------------------------------
UDP [IPv4] Stats: [0] #Recvd Datagrams = 9163,[1] #Discarded Datagrams [invalid port] = 359,[2] #Erroneous Datagrams = 7
 [3] #Sent Datagrams = 4827,[4] #UDP Listener Entries = 27
-----------------------------------------
UDP [IPv6] Stats: [0] #Recvd Datagrams = 0,[1] #Discarded Datagrams [invalid port] = 111,[2] #Erroneous Datagrams = 0
 [3] #Sent Datagrams = 657,[4] #UDP Listener Entries = 7
-----------------------------------------
ICMP [IPv4] Stats: [0] = # Incoming ICMP Messages : 10, [1] = # Incoming ICMP Errors : 0, [2] = # Outgoing ICMP Messages : 13, [3] = # Outgoing ICMP Errors : 0
-----------------------------------------
ICMP [IPv6] Stats: [0] = # Incoming ICMP Messages : 0, [1] = # Incoming ICMP Errors : 0, [2] = # Outgoing ICMP Messages : 35, [3] = # Outgoing ICMP Errors : 0
-----------------------------------------
# of adapters: 5
Adapter Index #13, Name = \DEVICE\TCPIP_{F5C17D50-4BE2-4008-BA0A-76067ABE7DE2}
Adapter Index #849, Name = \DEVICE\TCPIP_{4CD51587-472C-41E3-B0FD-C92CDA50FB20}
Adapter Index #786, Name = \DEVICE\TCPIP_{B73941B0-2376-4882-B70B-76B0F0ED8209}
Adapter Index #787, Name = \DEVICE\TCPIP_{B08246C5-DAC4-4823-A0A2-BD3F077BF4CC}
Adapter Index #15, Name = \DEVICE\TCPIP_{D2D5B3E5-1958-4C19-A719-BC16A5ABB6C5}
-----------------------------------------
+ Added Interface (index #0), Intel(R) 82577LM Gigabit Network Connection
+ Added Interface (index #786), VMware Virtual Ethernet Adapter for VMnet1
+ Added Interface (index #787), VMware Virtual Ethernet Adapter for VMnet8
+ Added Interface (index #849), VirtualBox Host-Only Ethernet Adapter
+ Added Interface (index #862), Microsoft 6to4 Adapter
Interface #1: [0] Index #0, [1] Type = 6, [2] Operational Status = 1, [3] Flags = 0x000000C5, [4] Physical [MAC] Address: 88-AE-1D-B1-08-30, [5] MTU =  1500
, [6] Description: Intel(R) 82577LM Gigabit Network Connection, [7] Friendly Name: Local Area Connection, [8] Adapter/Service Name [GUID] = {F5C17D50-4BE2-4008-BA0A-76067ABE7DE2}
, [9] Max Receive Speed [Vista+] = 100000000, [10] Max Transmit Speed [Vista+] = 100000000
, [11] IPv4 Address(es): 168.185.212.21, [12] IPv6 Address(es): 
, [13] Connection Type [Vista+] = 1, [14] Tunnel Type [Vista+] = 0
_Network_InterfaceEntryInfo return, @error = 3, @extended = 2
C:\_Downloads\NetworkStatistics.au3 (1268) : ==> Subscript used with non-Array variable.:
ConsoleWrite("Interface #"&$i+1&" Entry Info: [0] Interface Index = " & $aNIEntryInfo[0] & ", [1] Interface Type = " & $aNIEntryInfo[1] & ", [2] Operational Status = " & $aNIEntryInfo[2] & ", [3] Admin Status = " & $aNIEntryInfo[3] & ", [4] Physical Address = " & $aNIEntryInfo[4] & ", [5] MTU [Max Trans. Unit] in bytes = " & $aNIEntryInfo[5] & @CRLF & ", [6] Description = " & $aNIEntryInfo[6] & ", [7] Interface Name = " & $aNIEntryInfo[7] & @CRLF & ", [8] Last change [1/100th second] = " & $aNIEntryInfo[8] & ", [9] Interface Speed [bps] = " & $aNIEntryInfo[9] & @CRLF & ", [10] # Recvd Data [in Octets] = " & $aNIEntryInfo[10] & ", [11] # Recvd Unicast Packets = " & $aNIEntryInfo[11] & ", [12] # Recvd Non-Unicast Packets = " & $aNIEntryInfo[12] & ", [13] # Recvd Packets Discarded [no error] = " & $aNIEntryInfo[13] & ", [14] # Recvd Packets Discarded [error] = " & $aNIEntryInfo[14] & ", [15] # Recvd Packets Discarded [unk. protocol] = " & $aNIEntryInfo[15] & @CRLF & ", [16] # Sent Data [in Octets] = " & $aNIEntryInfo[16] & ", [17] # Sent Unicast Packets = " & $aNIEntryInfo[17] & ", [18] # Sent Non-Unicast Packets = " & $aNIEntryInfo[18] & ", [19] # Sent Packets Discarded [no error] = " & $aNIEntryInfo[19] & ", [20] # Sent Packets Discarded [error] = " & $aNIEntryInfo[20] & @CRLF & ", [21] Transmit Queue Length [n/a] = " & $aNIEntryInfo[21] & @CRLF)
ConsoleWrite("Interface #"&$i+1&" Entry Info: [0] Interface Index = " & $aNIEntryInfo^ ERROR
->11:51:04 AutoIt3.exe ended.rc:1

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Thanks, I'm gonna review it and see if there's something askew.  I haven't seen an index # 0 yet, so that's curious..


Share this post


Link to post
Share on other sites

Okay, apparently that 0 index is wrong and should be 13.  I *believe* this is due to my checks against IPv6Index.  Could you possibly locate the line

               " If $nIPAAStSize > 108 Then    ; XP SP1+ O/S Structure?"

and change that and the whole IF-Endif to read this:

                If $nIPAAStSize > 108 Then    ; XP SP1+ O/S Structure?
                    ; If IPv6 index is different than IPv4 Index, AND non-zero, use the latter
                    $nTemp = DllStructGetData($stIP_ADAPTER_ADDRESSES, "Ipv6IfIndex")
                    If $nTemp And $nTemp <> $aIPAddrTableEntries[$nNumEntries][0] Then
                        $aIPAddrTableEntries[$nNumEntries][0] = $nTemp
                    EndIf
                EndIf

Hopefully that would fix the problem.  I'm still not even sure if its worth checking Ipv6IfIndex yet, so I may modify that in the future.  However, the above code at least tests for a 0 condition, and won't change an index if Ipv6IfIndex is 0.

Thanks!


Share this post


Link to post
Share on other sites

nice!  New version uploaded!  Thx for the help spotting the error

Edited by Ascend4nt

Share this post


Link to post
Share on other sites

I Got Eror..

When I'm Disconnect Modem..

LINE 1340

$sSplashText &=StringFormat("%45,56s", $aNIEntryInfo[6] & @CRLF
$sSplashText &=StringFormat("%45,56s", $aNIEntryInfo^ ERROR
     
Error: Subscript used with non-Array variable

Edited by setengahgila

Share this post


Link to post
Share on other sites

I Got Eror..

When I'm Disconnect Modem..

....

 

A modem?! Really? :o   I thought those were all gone by now haha..

But anyway.. to the problem.  If you disconnect or disable a network interface, the index # assigned to it will fail to work, or possibly be reassigned when the device is reenabled.  But, just to be thorough here.. could you please insert this code and let me know what it reports when you disconnect the modem:

        $aNIEntryInfo = _Network_InterfaceEntryInfo($aIPAllAddrTable[$i][0])
        If @error Then
            ConsoleWrite("_Network_InterfaceEntryInfo return, @error = " & @error & ", @extended = " & @extended & @CRLF)
            ExitLoop
        EndIf

That goes in the For $i = 0 To $nIPs - 1 loop, line 1334.  It *should* return error code ERROR_NOT_FOUND (1168), if I understand it correctly.

The only way to get around the problem of disconnected devices is to rescan for devices using _Network_IPAllAddressTable().  But before we go there, it'd be good to see what kind of error code is returned.

Thanks for your help


Share this post


Link to post
Share on other sites

Updated today - version 3 (by my reckoning)!  This is now a full fledged Network Interface Information and Statistics UDF module.

2013-07-06:

 Added: Much more Adapter Information

 Changed: Example is now separate from the UDF

 Fixed some minor issues here and there

 Changed: Global Handle to IPHLPAPI.DLL is now contained in the UDF and used to speed up function calls

 Misc. Other fixes I didn't keep track of!

See 1st post, which is now a bit more detailed


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Colduction
      Hi again guys!, i had COVID-19 for twice and i couldn't check the forum since 3 or 4 months ago till now! i hope you will get better if you're fighting for beat COVID-19

      I have two question, first is about extracting all of the IP Address from an IP Ranges, for e.g: 192.168.1.1-192.255.255.255 (Start and End are variable and will be defined by the user) and for second one, i have a friend that he is Python programmer, he made a IP Parser that it can support large txt files (1TB) and it can parse all of them under 10min and it also supports low-end PCs that have 1 GB RAM!

      The list that his program parses are:
      #1765497 192.168.1.1 8082 #1765496 192.168.1.1 8084 #1965493 192.168.1.1 8089 #9565495 192.168.1.1 8086 #2565492 192.168.1.1 8081 and it converts very very fast to this:
      192.168.1.1:8082 192.168.1.1:8084 192.168.1.1:8089 192.168.1.1:8086 192.168.1.1:8081 I wonder how to do this via AutoIt, if you can help me in this way, i will be happy✌❤

      Thanks for your helps.

      FIRST_QUESTION_TEST.au3
    • By tarretarretarre
      Version 2.x.x and 3.x.x has been moved to branch 3.x
      About Autoit-Socket-IO
      Autoit-Socket-IO is a event driven TCP/IP wrapper heavily inspired from Socket.IO with focus on user friendliness and long term sustainability.
      I constantly want to make this UDF faster and better, so if you have any suggestions or questions (beginner and advanced) Do not hesitate to ask them, I will gladly help!
      Key features
      Simple API 99% data-type serialization thanks to Autoit-Serialize Can easily be extended with your own functionality thanks to Autoit-Events "Educational" examples Data encryption thanks to _<Crypt.au3> Limitations
      Speed. This UDF will sacrifice some speed for convenience Getting started
      Download the script from AutoIt or pull it from the official github repo git@github.com:tarreislam/Autoit-Socket-IO.git and checkout the tag 4.0.0-beta Check out the documentaion Take a look in the examples/ folder Changelog
      To see changes from 3.x.x and 2.x.x please checkout the 3.x branch
      Version 4.0.0-beta (This update break scripts.)
      Code base fully rewritten with Autoit-Events and decoupled to improve code quality and reduce bloat. The new UDF is very different from 3.x.x so please checkout the UPGRADE guide to fully understand all changes Added new documentation documentaion Success stories
      Since December 2017-now I have used version 1.5.0 in an production environment for 150+ clients with great success, the only downtime is planned windows updates and power outages.
       
      Newest version (2020-09-15!)

       
      Older versions (Not supported anymore)
      Autoit-Socket-IO-1.0.0.zip Autoit-Socket-IO-1.1.0.zip Autoit-Socket-IO-1.3.0.zip Autoit-Socket-IO-1.4.0.zip Autoit-Socket-IO-1.5.0.zip
      Autoit-Socket-IO-2.0.0.zip
    • By tarretarretarre
      Version 2.x.x and 3.x.x has been moved to branch 3.x
      About Autoit-Socket-IO
      Autoit-Socket-IO is a event driven TCP/IP wrapper heavily inspired from Socket.IO with focus on user friendliness and long term sustainability.
      I constantly want to make this UDF faster and better, so if you have any suggestions or questions (beginner and advanced) Do not hesitate to ask them, I will gladly help!
      Key features
      Simple API 99% data-type serialization thanks to Autoit-Serialize Can easily be extended with your own functionality thanks to Autoit-Events "Educational" examples Data encryption thanks to _<Crypt.au3> Limitations
      Speed. This UDF will sacrifice some speed for convenience Read more in the official thread
    • By TheXman
      Purpose (from Microsoft's website)
      The HTTP Server API enables applications to communicate over HTTP without using Microsoft Internet Information Server (IIS). Applications can register to receive HTTP requests for particular URLs, receive HTTP requests, and send HTTP responses. The HTTP Server API includes SSL support so that applications can exchange data over secure HTTP connections without IIS.
      Description
      There have been several times in the past that I wanted to either retrieve information from one of my PCs or execute commands on one of my PCs, whether it was from across the world or sitting on my couch.  Since AutoIt is one of my favorite tools for automating just about anything on my PC, I looked for ways to make to make it happen.  Setting up a full blown IIS server seemed like overkill so I looked for lighter weight solutions.  I though about creating my own AutoIt UDP or TCP server but that just wasn't robust enough,  Then I found Microsoft's HTTP Server API and it looked very promising.  After doing a little research into the APIs, I found that it was flexible & robust enough to handle just about any of the tasks that I required now and in the future.  So a while back I decided to wrap the API functionality that I needed into an AutoIt UDF file to allow me to easily create the functionality I needed at the time.  It has come in very handy over the years.  Of course it wasn't all wrapped up with a nice little bow like it is now.  That only happened when I decided to share it with anyone else who could use it or learn from it.
      The example file that I included is a very granular example of the steps required to get a lightweight HTTP Server up and listening for GET requests.  The UDF is a wrapper for the Microsoft APIs.  That means to do anything over and above what I show in the example, one would probably have to have at least a general knowledge of APIs or the ability to figure out which APIs/functions to use, what structures and data is needed to be passed to them, and in what order.  However, the UDF gives a very solid foundation on which to build upon.  Of course, if anyone has questions about the UDF or how to implement any particular functionality, I would probably help to the extent that I could or point you in the right direction so that you can figure out how to implement your own solution.
      The APIs included in the UDF are the ones that I needed in the past to do what I needed to do.  If any additional APIs need to be added to the UDF file, please make those suggestions in the related forum topic.
      Being that this is basically an AutoIt wrapper for the Microsoft API functions, there's no need to create AutoIt-specific documentation.  All of the UDF functions, structures, constants, and enumerations are named after their Microsoft API counterparts.  Therefore, you can refer to Microsoft's extensive documentation of their HTTP Server API.  As stated earlier, if there is one or more APIs that you find yourself needing for your particular solution, please suggest it in the related Example Scripts forum topic.
      Related Links
      Microsoft HTTP Server API - Start Page
      Microsoft HTTP Server API - API v2 Reference
      Microsoft HTTP Server API - Programming Model
×
×
  • Create New...