Strange traffic in java sockets
I'am investigating strange problem. I'am using java Sockets for IPC. And i'am worrying about strange traffic. When i use c# and transfer strings via StreamWriter it is ok:
But when i use java and ObjectOutputStream\ObjectInputStream it is very strange:
First column is inbound traffic and second is outbound.
It is simple code:
ObjectOutputStream oos = ObjectOutputStream(clientScoket.getOutputStream())
oos.writeObject(someCustomObject);
on another side:
ObjectInputStream ois = ObjectInputStr开发者_如何学编程eam(clientSocket.getInputStream());
SomeCustomObject sco = oos.readObject();
How inbound traffic can be unequal to outbound? Anyone?
It's some sort of problem in sniffing loopback traffic under Windows. I tried and no tools found anything (Wireshark and WinPCap cannot loopback). When you use simple streams and just write some bytes it is okay. The problem appears only with ObjectIputStream
.
精彩评论