Hi,
i have a big problem. I have a Java-server that communicates with at c++ implemented client. The Java-server writes "HI" as soon it gets a connection with a client. The client get conected to the java-server but it gets never the string "Hi". It's no problem when the client is a java-client! I use the following code to print "HI":
private void println(String s, boolean flush) throws IOException
{
out.write(s.getBytes());
out.write("\r\n".getBytes());
if (flush)
out.flush();
}
out is a PrintStream class. I used before PrintWriter and i get the same problem but not with the same high frequency.
I know that the class PrintStream uses a native method in the
bottom:
SocketOutPutStream.socketWrite(byte[ ],int,int)
best regards
Alvaro e-mail:alvaror@mwm.se
i have a big problem. I have a Java-server that communicates with at c++ implemented client. The Java-server writes "HI" as soon it gets a connection with a client. The client get conected to the java-server but it gets never the string "Hi". It's no problem when the client is a java-client! I use the following code to print "HI":
private void println(String s, boolean flush) throws IOException
{
out.write(s.getBytes());
out.write("\r\n".getBytes());
if (flush)
out.flush();
}
out is a PrintStream class. I used before PrintWriter and i get the same problem but not with the same high frequency.
I know that the class PrintStream uses a native method in the
bottom:
SocketOutPutStream.socketWrite(byte[ ],int,int)
best regards
Alvaro e-mail:alvaror@mwm.se