You can check the available characters on the input stream like this
if (in.available() == 0) {
// Nothing left on the stream to read
}
It's probably better to check for a terminating token since the test above does
not guarantee that the sender is done sending, only that there is nothing else
to read at the time of the check.
> From: [email protected]
> To: [email protected]
> Subject: How to tell when TelnetClient has finished receiving
> Date: Wed, 3 Jun 2009 11:34:34 +1000
>
> Hi,
>
>
>
> Is there a way to determine when the TelnetClient has finished receiving
> everything via the input stream? I'm trying to use SendAYT() method, but it
> appears to be a very messy way of checking.
>
>
>
> Regards,
>
>
>
> Dale Harris
>
> IT Support
>
> Martin Jonkers Motors
>
> Morayfield Qld 4506
>
> Ph: 07 5495 1844
>
>
>
_________________________________________________________________
Windows Liveā¢: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009