I have client-server app. Client on C++, server on Java.
I am sending byte-stream form client to server, and from server to client.
Tell me please, when I sent char(-1) from C++, what value equals to it in Java?
And what value I must sent from Java to C++, to get char(-1) in Cpp code?
I have client-server app. Client on C++, server on Java. I am sending byte-stream
Share
As you are writing through a byte stream, your
char(-1)arrives as255, as byte streams normally transmit unsigned bytes.The
-1which is read when you read the end of a stream can not be send explicitely but only through closing the stream.