开发者

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:

Strange traffic in java sockets

But when i use java and ObjectOutputStream\ObjectInputStream it is very strange:

Strange traffic in java sockets

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜