AKiNO
AKiNO

Reputation: 41

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:

enter image description here

But when i use java and ObjectOutputStream\ObjectInputStream it is very strange: https://i.sstatic.net/7bWSt.png

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 = ObjectInputStream(clientSocket.getInputStream());
SomeCustomObject sco = oos.readObject();

How inbound traffic can be unequal to outbound? Anyone?

Upvotes: 3

Views: 195

Answers (1)

AKiNO
AKiNO

Reputation: 21

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.

Upvotes: 2

Related Questions