org.voovan.network.messagesplitter.TransferSplitter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of voovan-framework Show documentation
Show all versions of voovan-framework Show documentation
Voovan is a java framwork and it not depends on any third-party framework.
package org.voovan.network.messagesplitter;
import org.voovan.network.IoSession;
import org.voovan.network.MessageSplitter;
import java.nio.ByteBuffer;
/**
* 透传处理器
* 直接将数据进行透传,收到即调用过滤器,然后调用 IoHandler.onRecive 方法
* 使用这个分割器的时候不推荐使用过滤器,应为报文并不完整.
*
* @author: helyho
* Voovan Framework.
* WebSite: https://github.com/helyho/Voovan
* Licence: Apache v2 License
*/
public class TransferSplitter implements MessageSplitter {
@Override
public int canSplite(IoSession session, ByteBuffer byteBuffer) {
return byteBuffer.limit();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy