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

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -