Ok, now I have managed to use the stream unlimited times, you need to replace in the server:
print readstring$(strm)
by
while eof(strm)=0
print readstring$(strm)
wend
The reason why is, if they gave you a plate full of food, you first have to eat it all to get the next plate. Or in tech terms: as long as there is still something in the buffer, you cannot receive a new object, so always make sure to read until there is EOF or a timeout.
print readstring$(strm)
by
while eof(strm)=0
print readstring$(strm)
wend
The reason why is, if they gave you a plate full of food, you first have to eat it all to get the next plate. Or in tech terms: as long as there is still something in the buffer, you cannot receive a new object, so always make sure to read until there is EOF or a timeout.