#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\AutoIt\Zusätze\Aeon_Icon_Pack\ICO\Misc\Buddy-Green.ico
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;##### Client Skript #####
;start Server zuerst

#include <GUIConstants.au3>

$ServerIP = @IPAddress1

;$DNS = "www.google.de"
;$ServerIP = TCPNameToIP($DNS)

$Port = 33891

TCPStartup()

$ConnectedSocket = TCPConnect($ServerIP, $Port)

If @error Then
	MsgBox(4112, "Error", "TCP Connect failed with WSA error: " & @error)
Else
	While 1
		$Data = InputBox("Data send to the Server", "Pls enter data: ")
		If @error or $Data = "" Then ExitLoop
		TCPSend($ConnectedSocket, $Data)
		If @error Then ExitLoop
		#cs
		$incomming = TCPRecv($ConnectedSocket, 2048)
		if $incomming <> "" Then
			$incomming = StringSplit($incomming, "|")
			MsgBox(0, "Incoming Message", $incomming)
			$incomming = ""
		EndIf
		#ce
	WEnd
EndIf