Jump to content
Sign in to follow this  
bogQ

Learning about TCP servers and clients connection

Recommended Posts

Nice tutorial. You should probably look at using variable declaration in your examples. For example your Global declaration should be Local as the variable isn't used anywhere else but in Local scope.


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

server is already set to handle more than 1 connection, you just need to:

get rid of msgbox (use gui commands instead) that pause server

limit if needed numebr of connection that it will handle

change how and when will server disconnect clients

Read server part with explained code for more info.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Thanks for the code and tutorial, helpful codes. let me start by saying i am a beginner, so please don't laugh too at my questions!

1. with your codes, I have to run the server and client codes on every PC connected on my network. is there a possibility that I might run the codes for server just once and on the other PCs, i will just have to run but the codes for clients?

2. I wish to have 3 or more Computers, the first computer is my master, where my server runs, the other computers are my client. I wish to send message in both dirrection via TCP as is the case with your codes how am I going to do it?

3. I have tried to open TCP socket via internet but all my attemps have failed. my internet IPaddress is 192.168.1.1

I will be grateful if you find time and provide me some helps.

Best regards

Hubert

Share this post


Link to post
Share on other sites

Guess i need to add litle more info about networks on first post

lets expalind it heare like this

I have 2 computers and i need to do TCP over wireless network.

My first computer (he will be server) need to lissen on my second adapter (my first adapter is lan, my second adapter is wireless card), he (wirelles card) is with IP adress @IPAddress2 or 192.168.0.1 (@IPAddress2 is my wireless adapter IP that i manyaly tuped on adapter)

my second computer that have only client on him is with ip address 192.168.0.2 on his wireless lan card and he is connected over that card to my wireless card so that we can be in network, but his IP is not important cos i only need to know server IP adress 192.168.0.1 so that i can connect on him.

so on server im starting it with

$Listen = TCPListen(@IPAddress2, 1018, 500)

or with $Listen = TCPListen('192.168.0.1', 1018, 500), it is identical cos @IPAddress2 will return (in my case) IP address of my second device 192.168.0.1

and on client script im putting

$Socket = TCPConnect('192.168.0.1', 1018)

so im connection on IP adress of server with client

now let's say that i wanna connect more than one pc but not on my wireless network cos it accept only 2 computers, i wanna do it on lan network adapter (my first lan device), on lan i have 6 PC-s connected on network.

My first comp is with ip adress lets say 10.0.252.30 on my local area connection adapter.

How can i confirm that my ip is 10.0.252.30?! From start meny i sellect run (or in win 7 just tupe cmd and hit enter with no run) tupe in cmd and press enter. after that in cmd i type in ipconfig and press enter.

it will list all of your adapters and their ip (IPv4) addresses.

So im gona start server on my network lan adapter

$Listen = TCPListen('10.0.252.30', 1018, 500)

and every client i connect on him will connect to that ip adress

so on client im dooing this

$Socket = TCPConnect('10.0.252.30', 1018)

So i will connect more than one client and only one comp (my first comp) will serve as my server.

Note that somethimes firewall can cose problems, so if you have problems turn it off to see if it will work.

As for internet communication i can't help a lot, i never tried coz my ports are forwarded. Main thing i know is if your behind router form your ISP and your ports arn't forwarded you need to call your ISP on the phone and to tell him to forward that darn port and don't hang up till he say "ok i forwarded it".

If router is in your controll, don't call ISP, take a look at this videos (they are nice tytorials)

and do it yourself ;)

here you can check if others can see you on that port

http://www.yougetsignal.com/tools/open-ports/

or

http://www.canyouseeme.org/

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Thank you bogQ for this terrific tutorial!

The time you put into this is very much appreciated!

Great work!

Would you be okay with taking this to the next level?

-Adding GUI instead of Msgbox

-Having one script work as both server and client to create an Instant Messaging program

-Adding Contact List of all machines that are connected (listed as IP address or @ComputerName

This would probably be a big project, but written in the style that you have already done would be of great help.

I figure it never hurts to ask and certainly you've given us a great base of understanding to work from.

Thank you again!

Edited by coffeeturtle

Share this post


Link to post
Share on other sites

Thnx for your helpful topic.

I have a question though. I would like to use TCP to connect (lets say) 2 computers but in different houses. So different IP adresses.

So the connection should go via WAN, not LAN. How can I make my real IP adress, like 77.170.181.98, serve as a server?

Thnx in advance :)

Share this post


Link to post
Share on other sites

Guess someone with more experience with internet communication should answer this one but if im wrong they can still correct me or at least confirm if this is correct :P (as i stated before "i can't help a lot, i never tried coz my ports are forwarded")

So "if im not wrong",

one computer is server, his public IP address is 77.170.181.98

one client, we dont need to know his ip adress, but he need to know server public IP address.

Server TCPListen on his addapter IP adress (so that isnt 77.170.181.98, we need adapter address) (port must be forwarded on router)

Client connect to 77.170.181.98 server public IP adress.

So client try to connect to server

*Client send msg to server ip adress

77.170.181.98:8080 -> "are you there?"

*router recive msg for port 8080 and forward it on that port to your listening device 10.0.252.30

->77.170.181.98:8080 -> 10.0.252.30:8080 -> "are you there?"

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

that's basically how it works. i just use TCPListen("0.0.0.0", 8080) and it automatically listens on your default adaptor. no need to even get lan/wan ip on the server.

on the router, forward 8080 to your local server ip.

on the client, connect to the servers WAN.

or use @IPAddress1 instead of 0.0.0.0. either should work fine.

edit: 0.0.0.0 makes it listen on "any available" ip, so it will work with multiple adaptoras, i believe.

Edited by caleb41610

Share this post


Link to post
Share on other sites

Ok thnx for the info.

It is still not working though.

This is a picture of the port I forwarded (is this right??):

Posted Image

And then this is the server script line:

$Listen = TCPListen('192.168.2.8', 8080, 500)

And this is the client's line:

$Socket = TCPConnect('77.170.181.98', 8080)

This should be good, right?

It is not working though, please tell me if I did something wrong

Share this post


Link to post
Share on other sites

as i told my isp did not forwarded my ports so i can test

in theory it should work

i posted 2 links in first post

http://www.yougetsignal.com/tools/open-ports/

or

http://www.canyouseeme.org/

so can they see you on port 8080?

another question is , is your port 8080 free? no other program is using him?

did you try on some other port? is your wirewall off?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Ok thnx for the info.

It is still not working though.

This is a picture of the port I forwarded (is this right??):

Posted Image

And then this is the server script line:

$Listen = TCPListen('192.168.2.8', 8080, 500)

And this is the client's line:

$Socket = TCPConnect('77.170.181.98', 8080)

This should be good, right?

It is not working though, please tell me if I did something wrong

You must also open the port in your firewall.

Share this post


Link to post
Share on other sites

Ok still now working.

I changed to port 8081 (just to be sure the port wasn't used by anything else)

I also opened 8081 on my windows firewall.

I checked with the port website, and it says the port is open (if the server is running):

As you see, the port is open.Posted Image

Now when I run the client, I get the following error:

!--> TCPConnect error number ( 10060 ), look in the help file (on MSDN link) on func TCPConnect to get more info about this error.

BTW: I'm running the client and server on the same pc (thus same ip adress). Could this be causing my trouble?

I've been trying to make this work for ages now, please help me out once more!

Thnx :)

Edited by ludocus

Share this post


Link to post
Share on other sites

yes it can, if you ever had experience with wamp server or wow servers for example, you couldn't never connect to the site or gameserver on internet connection ip adress from the computer that is running that server, but you can go to that adress if you go to some proxy with browser site and connecting with it with no problems.

so

WSAETIMEDOUT 10060

Connection timed out.

A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond.

can be cuz of that, and in addition it can be cuz of port problem, or something third.

So please do try to connect with 2 different computers with 2 different internet connection on them. (call some friend and tell him to run your client)

if it dont work try some other random ports eg 3724 8129 28960...

and try to lisssen on ip 0.0.0.0

for some other info to "can it realy work" you can look at this post to see that TCP do work on internet if everything is configyred in the correct way and your isp isnt playing with you.

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

just a quick note from my side, after i convince my isp to geave me some free ports for next month, i tryed to connect over internet on port 8080 today to test do it work or not

tcp lisen on 0.0.0.0 and after that on @IPAddress1 with port 8080, connected to server public IP and message recived, sended, and recived with no problems

port 80 did have probably cos my wamp did use it when i try it on.

So it do work with no problem if everything is configured correctly.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Excellent. This was exactly what I needed.

I have another script I'm building that's generating text output. I wanted to be able to call a separate script running a TCP server, pass the data over Stdin, and have the Server duplicate out whatever data is was sent to whatever clients are connected at the time, and manage listening, opening, and closing Sockets.

I have something like this compiled to .EXE, though if running as an .au3 file, it will prompt you with an Input box for data to send. Connect and disconnect as many Telnet (Putty, Teraterm) sessions as you want and they start getting output.

 

#include <Array.au3>
#include <WinAPIProc.au3>
;Ref https://www.autoitscript.com/forum/topic/144987-learning-about-tcp-servers-and-clients-connection/
    $ParentPID = _WinAPI_GetParentProcess()
TCPStartup()
OnAutoItExitRegister("OnAutoItExit")
    Dim $Socket_Data[1]
$Socket_Data[0] = 0
$Listen = TCPListen("0.0.0.0", 1018, 500)
If @error Then
    ConsoleWrite('!--> TCPListen error number ( ' & @error & ' ), look in the help file (on MSDN link) on func TCPListen to get more info about this error.' & @CRLF)
    Exit
EndIf
    While ProcessExists($ParentPID)
    If @Compiled=0 Then
        $TCPdata=InputBox("TCPServer","Type Data to send")
    Else
        $TCPData = ConsoleRead()
        EndIf
        If StringLen($TCPData) > 0 Then
        For $x = $Socket_Data[0] To 1 Step -1
            TCPSend($Socket_Data[$x], $TCPData)
            If @error Then
                _CloseConnection()
            EndIf
        Next
    EndIf
    _Accept()
    Sleep(500)
WEnd
    Func _Accept()
    Local $Accept = TCPAccept($Listen)
    If $Accept <> -1 Then
        _ArrayAdd($Socket_Data, $Accept)
        $Socket_Data[0] += 1
    EndIf
EndFunc   ;==>_Accept
    Func _CloseConnection()
    _ArrayDelete($Socket_Data, $x)
    $Socket_Data[0] -= 1
EndFunc   ;==>_CloseConnection
    Func OnAutoItExit()
    TCPShutdown() ; Close the TCP service.
EndFunc   ;==>OnAutoItExit

    I then use this script to establish the link to Stdin:
     

    #include <AutoItConstants.au3>
$iPID = Run("tcpserver.exe", "", @SW_HIDE, $STDIN_CHILD)
While 1
    $Data=InputBox("Input","data")
    StdinWrite($iPID,$Data)
Wend
   

 

Edited by TurionAltec

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 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
    • By YogendraAtluri
      Hi, 
      I am new to AutoIT scripting and I am still learning. I am trying to communicate with a Labview application that acts like a server. it basically takes commands from the client. But for some commands, it also send back some data. 
      When i am sending commands from my script, i can see that the labview is getting them. But i am not able to get anything back. I tried different code pieces that are available online in the forum.
      This is the working piece of code which i been using to send data.
      #cs This module is used to establish tcp connection with lab view #ce #include <File.au3> Func SendCmd($cmd) TCPStartup() Local $IpAddress="192.168.10.101" Local $Port="5353" $Labview = TCPConnect($IpAddress,$Port) If @error Then ConsoleWrite('!--> TCPConnect error number ( ' & @error & ' ).' & @CRLF) TCPCloseSocket($Labview) TCPShutdown() Exit EndIf TCPSend($Labview, $cmd & @CRLF) TCPCloseSocket($Labview) TCPShutdown() EndFunc SendCmd("wt42d")  
      This is slightly modified code to send and receive data, which is not working. I am not getting any response back
      SendCmd("galil") Func SendCmd($cmd) TCPStartup() Local $IpAddress="192.168.10.101" Local $Port="5353" $Labview = TCPConnect($IpAddress,$Port) If @error Then ConsoleWrite('!--> TCPConnect error number ( ' & @error & ' ).' & @CRLF) TCPCloseSocket($Labview) TCPShutdown() Exit EndIf TCPSend($Labview, $cmd & @CRLF) $ip = @IPAddress1 ;create listening socket $Listensocket = TCPListen($ip, $Port) ConsoleWrite("Listening to Socket - " & $Listensocket & @CRLF) If $Listensocket = -1 Then ConsoleWrite("Exiting..." & @CRLF) Exit EndIf ;Accept incoming clients and recieve info While 1 $connectedsocket = TCPAccept($Listensocket) ConsoleWrite("Connecting to Socket - " & $connectedsocket & "Error -" & @error & @CRLF) If $ConnectedSocket >= 0 Then $ip2 = TCPRecv($connectedsocket,1000000) EndIf WEnd TCPCloseSocket($connectedsocket) TCPCloseSocket($Labview) TCPShutdown() EndFunc I am not getting anything back. I am getting the following output in the console
      +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. Listening to Socket - 544 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 Connecting to Socket - -1Error -0 its going through that loop forever. i need to force stop it.
      But when i open putty and send the same command, i am getting response right away. 
      Can someone please help me with that.
      Thanks in advance
      Regards
      Yogendra
    • By argumentum
      I can TCP/IP in AutoIt, hence, make a HTTP deamon. Now, how can I HTTPS to use SSL !??
      Well, Apache has this "mod_proxy.so" module that can let me have SSL and what not is in Apache.
      All that is needed is to tell Apache what I wanna do by editing httpd.conf .
      # Implements a proxy/gateway for Apache. # 1. Open /Applications/XAMPP/etc/httpd.conf # 2. Enable the following Modules by removing the # at the front of the line. # - LoadModule rewrite_module modules/mod_rewrite.so # - LoadModule proxy_module modules/mod_proxy.so # - LoadModule proxy_http_module modules/mod_proxy_http.so # # 3. Copy and Paste below to the bottom of httpd.conf # <IfModule mod_proxy.c> ProxyRequests On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyVia Off ProxyPreserveHost Off ProxyPass /home/ http://127.0.0.1:84/home/ ProxyPassReverse /home/ http://127.0.0.1:84/home/ SetEnv proxy-nokeepalive 1 # ..since we are not using "keep-alive", we are using "close" </IfModule> ...et voila  
      I'm using XAMPP ( https://www.apachefriends.org/download.html )
      and this is my solution to avoid coding in PHP, as I feel more comfortable coding in AutoIt.
      A "muli-thread or concurrency" can be done by forking the socket ( https://www.autoitscript.com/forum/topic/199177-fork-udf-ish/ )
      but responses are under 20 ms., so I feel fine with a single thread.
      I modified an example ( attached below ), so can try out the concept.
      PS: I am not an Apache guru. I just discovered this and it opens a world of possibilities. In my case, I'm thinking of an API to query SQLite 
      PS2: I'm not gonna make Poll but do click like if you do  
       
      201673-json-http-post-serverlistener.au3
    • By tarretarretarre
      Autoit-Socket-IO
      Introduction
      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 created this UDF because I was fascinated how Socket.IO made a such scary task "reliable and secure networking" so simple for the developer. So this was my main motivation.
      I constantly want to make this UDF faster and better, so if you have any suggestions. Do not hesitate to make requests!
      Features
      Flexiable and easy to understand API Above avarage documentation "Fully featured" examples Security in form of data encryption and middleware-support Limitations
      Speed. Because I want this UDF to be as flexible and simple as possible. Sometimes speed is sacrificed, but that does not mean i don't try to . It is not possible to emit objects mainly because autoit does not support serialization. Only 1D-arrays can be emitted (2D arrays will probably never be supported) Success story
      Since December 2017-now I have used version 1.5.0 in an production environment for 40+ clients with great success, the only downtime is planned windows updates and power outages.
      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 2.0.0 The documentation is located at Docs\index.html Take a look in the examples/ folder Changelog
      Version 2.0.0 (This update break scripts. Please consult the upgrade.md for guidance)
      All global internal variables has been renamed. Added a bunch of new API methods: _Io_RegisterMiddleware, _Io_whoAmI, _Io_IsClient, _Io_IsServer, _Io_getAllByProperty and _Io_getFirstByProperty and some more. Read more about these in the documentation. _Io_socketGetProperty now has a setter method called _Io_socketSetProperty which can be used to set custom properties. _Io_socketGetProperty now has a third parameter "default" which is used when a property is not found Removed _Io_setEventPostScript and _Io_setEventPretScript in favor of _Io_RegisterMiddleware Improved documentation (It still needs some love though) Improved the verbosity of _Io_DevDebug  
      Newest version (2019-09-29!)
      Autoit-Socket-IO-2.0.0.zip
      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
×
×
  • Create New...