I want to send a TCPMessage from my Java TCP-Client to my Visual Basic server.
The server uses the BinaryReader.ReadString() function.
http://msdn.microsoft.com/en-US/library/system.io.binaryreader.readstring.aspx
The ReadString function expects a 7bit-length prefix of the size of the string.
Currently this is my code, but the server doesn't recognize the message.
public void sendMessage(String message) {
if (out != null && !out.checkError()) {
out.print(message.length());
out.println(message);
out.flush();
}
}
And I can't change the whole server architecture to make it recognize the string e.g. From ReadLine.
Hope that somebody can help, trying it now for hours.