I hava a socket server is written in Java and the client is written in C#.
If I use the InputStream in a socket server, I can get the request from the Client. My code as below:
InputStream myIN = sock.getInputStream();
byte[] b = new byte[10];
int revByte = myIN.read(b);
but if I use the ObjectInputStream in the socket server, I can not receive any request from the Client.
The exception is: "java.io.StreamCorruptedException: invalid stream header"
My code as below:
in = new ObjectInputStream( sock.getInputStream() );
Object value = in.readObject();
So, my question is: can C# client work with ObjectInputStream in Java via socket?
Any helping will be appreciate.
Thanks so much,
Dan