in reply to Re: Interactive simple client server
in thread Interactive simple client server

Thanks, I went through a lot of it, but couldn't find any reason why the above didn't work.

Anyway, after spending few hours with this not going anywhere, I decided to create an account and post the question, and just typical, soon after I found the solution:

<$socket> only returns after a complete line is received, which is to say when newline is received. sysread will return as soon as data is available

so I've just tried that if I add newline (0x0A) to the reply or even better, use sysread instead, everything is fine (d'huh!)

I'll see about the timeout next :-)