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

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -