java - Read Full input from TCP Server -
i working on client/server project. until both have been in c++ , making client java based. in order receive server have been using
bufferedreader in = new bufferedreader(new inputstreamreader(socket.getinputstream()));
and have been using
in.readline()
the problem when need receive multiple lines server, client stops after first line because of '\n' character.
how avoid happening , receive of info?
i thought of using char[] this:
char[] buffer = new char[1024];
but problem when client receives next message there still left overs in buffer.
any great!
thanks
Comments
Post a Comment