netty proxy发送UnpooledUnsafeDirectByteBuf剪切包

时间:2014-06-10 06:29:16

标签: proxy netty

I meet a very strange problem when I use netty proxy to develop programs and 
I hope you can help me solve this problem. 

The details of the problem are as follows:

Use the proxy  package in the folder of example, proxyA connect proxyB, 
proxyA encrypt bytes-->HexDumpProxyFrontendHandler      ===>     proxyB HexDumpProxyFrontendHandler --> decryption
when went back,
ProxyB encrypt bytes-->HexDumpProxyBackendHandler       ===>     proxyA HexDumpProxyBackendHandler --> decryption

When proxyA and proxyB are both in windows operating system, there is no problem 
and channelRead is UnpooledHeapByteBuf.

However, when proxyA is in windows operating system and proxyB is in linux 
operating system, 
 it goes wrong and channelRead becames UnpooledUnsafeDirectByteBuf.

Turns out under this situation, UnpooledUnsafeDirectByteBuf is cut into many data 
packets. 
I want to know how to write code to avoid this problem?


0 个答案:

没有答案