本人用了mina2.0的包,在WIN下截超过一千个字符没有问题,可是将程序迁到AIX下就只能截到1024了,1024以后的字符都截不到了,是不是AIX下的IO流或是什么缓存不够了.得到报文内容方法如下:
public void messageReceived(IoSession session, Object message)
throws Exception {
IoBuffer rbuf = (IoBuffer) message;
while (rbuf.hasRemaining()) {
ByteBuffer byteBuffer = rbuf.buf();
int len = byteBuffer.remaining();
byte[] data = new byte[len];
rbuf.get(data);
String rdata = new String(data);
session.close(true);
}