Hi!everyone! I have a java program work as a socket client to communciate with the c server. the java client send a String to the c side server,receive the reply.but the reply String's length is unknow. I use OutputStream.write(byte) to send String to c server.I worked fine.
my question is how should I receive the String from c side?the c return a string ends with '\0', how can I trim it. Can somebody show me the working code.