i have created two simple applications, 1st is the Server application, 2nd is the Client Application.
Now I try to transfer the following string from the client to the server, but on the Server App I only receive the first Line. Why? The string comes from test.txt with the content:
Line 1 CR
Line2 CR
Line3
Server:
Code: Select all
on mouseUp
accept connections on port 8080 with message "is_Connected"
end mouseUp
on is_Connected theIP
read from socket theIP until return with message "newMessage"
end someoneConnected
on newMessage theIp theMessage
#### --put theIP & ":" && theMessage & return after field "text"
#### --read from socket theIP until return with message "newMessage"
answer theMessage
#### Check the transferred string
end newMessage
Client:
Code: Select all
## open the file text.txt with the content into theFile3
local tPath
put the effective filename of this stack into tPathmailconfig
set the itemDelimiter to slash
delete last item of tPathmailconfig
put tPathmailconfig & "/test.txt" into theFile3
put url("file:" & thefile3) into socketfile
answer socketfile
## File read done, seems complete
open socket to "localhost:8080"
if the Result <> "" then
put "result:" && the result
end if
write socketfile to socket "localhost:8080"
close socket "localhost:8080"
end mouseUp