Re: echoclient reading from server
- From: Gordon Beaton <n.o.t@xxxxxxxxx>
- Date: 01 Jul 2008 14:07:56 GMT
On Tue, 1 Jul 2008 06:41:31 -0700 (PDT), jimgardener wrote:
problem here is that the echo would come only after client says bye to
the server..I would like the server to return the echo as soon as i
type in.Is that possible?
It's possible to wait for the server to reply anywhere you like. An
idea is to do that after sending each line instead of after sending
the entire user input.
Also ,since i am allocating the ByteBuffer as of 1024 bytes..the
returned string ('text' in the above code) is 1024 bytes length and
this is displayed by debug() as a string with a lot of blanks at the
end
read() tells you how much it read, and there is a String constructor
that lets you specify how much of the buffer to use.
/gordon
--
.
- References:
- echoclient reading from server
- From: jimgardener
- Re: echoclient reading from server
- From: Gordon Beaton
- Re: echoclient reading from server
- From: jimgardener
- echoclient reading from server
- Prev by Date: Re: echoclient reading from server
- Next by Date: Re: echoclient reading from server
- Previous by thread: Re: echoclient reading from server
- Next by thread: Re: echoclient reading from server
- Index(es):
Relevant Pages
|