Hallo Profis
Kann mir bitte jemand helfen. Möchte zwischen zwei Rechnern Daten austauschen über das Heimische Netzwerk. Klappt leider nicht. Hier mal der Code vom Server und Client
Grüß Günter
SERVER
on mouseUp
put empty into field „status“
startServer
end mouseUp
command startServer
put empty into field „receivedMessages“
accept connections on port 8080 with message „newClient“
put „Server gestartet, warte auf Verbindungen…“ into field „status“
end startServer
on newClient clientSocket
read from socket clientSocket with message „dataReceived“
put „Client verbunden: “ & clientSocket & return after field „status“
end newClient
on dataReceived clientSocket, data
put „Empfangen: “ & data & return after field „receivedMessages“
read from socket clientSocket with message „dataReceived“
end dataReceived
CLIENT
on mouseUp
put empty into field „status“
sendMessage
end mouseUp
command sendMessage
put field „messageToSend“ into tMessage
open socket to „192.168.1.2:8080“ with message „socketOpened“
end sendMessage
on socketOpened socketID
put field „messageToSend“ into tMessage
write tMessage & return to socket socketID
close socket socketID
put „Nachricht gesendet: “ & tMessage into field „status“
end socketOpened