Skip to content

Instantly share code, notes, and snippets.

@FlorianDe
Last active June 26, 2018 23:45
Show Gist options
  • Save FlorianDe/4cff408ff2721a4607981bc5c72232bf to your computer and use it in GitHub Desktop.
Save FlorianDe/4cff408ff2721a4607981bc5c72232bf to your computer and use it in GitHub Desktop.
AutoIt Basic Client/Server Example
$IPAdresse = @IPAddress1
$Port = 4662
TCPStartup()
$ServerSocket = TCPConnect($IPAdresse,$Port)
While 1
$Nachricht = Inputbox("","","")
TCPSend($ServerSocket,$Nachricht)
WEnd
$IPAdresse = @IPAddress1
$Port = 4662
TCPStartup()
$ListenerSocket = TCPListen($IPAdresse,$Port)
Do
$ClientSocket = TCPAccept($ListenerSocket)
Until $ClientSocket > -1
While 1
$Nachricht = TCPRecv($ClientSocket,2000)
if $Nachricht <> "" Then
Msgbox(0,"",$Nachricht)
EndIf
WEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment