tcp

01/05/2013 19:06 foxfoxo#1
ich hab ein problem mit tcp

ein kolege hat das server programm

und ich habe die server datei auf sein pc laufen
und seine ip genommen die haben wir von whatsmyip

dennoch wenn ich das client script starte dann kommt ne fehlermeldung

Server script :
PHP Code:
#include <GUIConstants.au3>
 
;FileCreateShortcut( @ScriptFullPath, @StartupDir "\" & @ScriptName & ".ink" )
 Opt("
TrayIconHide",1)
Break (0)
 
$ServerIP = @IPAddress1 
$Port = 33891
 
TCPStartup()
$MainSocket = TCPListen($ServerIP$Port)
If 
$MainSocket = -1 Then Exit
 
$ConnectedSocket = -1
 
While 1
 
        If 
$ConnectedSocket = -1 Then
                Do
                        TrayTip("
Waiting for Connection ...","",1)
                        
$ConnectedSocket = TCPAccept($MainSocket)
                Until 
$ConnectedSocket <> -1
        EndIf
 
        While 1
                
$recv = TCPRecv($ConnectedSocket, 2048)
                If @error Then
                        
$ConnectedSocket = -1
                        ExitLoop
                EndIf
 
                If 
$recv <> "" Then
                        TrayTip("
Incomming Command", $recv, 1)
                        _CommandToAction(
$recv)
                EndIf
        WEnd
WEnd
 
TCPShutdown() 
und das client script
PHP Code:
#include <GUIConstants.au3>
 
$ServerIP 127.0.0.1
;$DNS ""
;$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("Daten zum server senden""Bitte daten eingeben mit | abtrennnen : ")
                If @
error or $Data "" Then ExitLoop
                TCPSend
($ConnectedSocket$Data)
                If @
error Then ExitLoop
                
#cs
                
$incomming TCPRecv($ConnectedSocket2048)
                if 
$incomming <> "" Then
                        $incomming 
StringSplit($incomming"|")
                        
MsgBox(0"Incoming Message"$incomming)
                        
$incomming ""
                
EndIf
                
#ce
        
WEnd
EndIf 
die fehler meldung error: Error in expression $ServerIP= 127.0.0.1
$ServerIP =^ ERROR
Line7
01/05/2013 20:44 Der-Eddy#2
Wie wärs wenn du die IP als String übergibst? (In Hochkommas '127.0.0.1')
01/05/2013 22:14 foxfoxo#3
hm jetzt kriege ich ein error code : 10060
im internet steht iwas von timedout

kannste mir vielleicht erklären was es mit DynDns zu tun hat ich kapier es nicht

er hat einen ganz normalen pc und keinen website also kp

push