netty4 能不能运行在android上
1个回答
展开全部
netty-buffer-4.0.17.Final.jar
netty-codec-4.0.17.Final.jar
netty-common-4.0.17.Final.jar
netty-handler-4.0.17.Final.jar
netty-transport-4.0.17.Final.jar
bootstrap = new Bootstrap();
bootstrap.group(new NioEventLoopGroup());
bootstrap.channelFactory(new ChannelFactory<NioSocketChannel>(){
@Override
public NioSocketChannel newChannel() {
NioSocketChannel channel=new NioSocketChannel();
Log.d("ClientConnection", PooledByteBufAllocator.DEFAULT.toString());
channel.config().setAllocator(PooledByteBufAllocator.DEFAULT);
return channel;
}
});
解决传输文件的时候爆没有sun buf类的问题
channel.config().setAllocator(PooledByteBufAllocator.DEFAULT);
netty-codec-4.0.17.Final.jar
netty-common-4.0.17.Final.jar
netty-handler-4.0.17.Final.jar
netty-transport-4.0.17.Final.jar
bootstrap = new Bootstrap();
bootstrap.group(new NioEventLoopGroup());
bootstrap.channelFactory(new ChannelFactory<NioSocketChannel>(){
@Override
public NioSocketChannel newChannel() {
NioSocketChannel channel=new NioSocketChannel();
Log.d("ClientConnection", PooledByteBufAllocator.DEFAULT.toString());
channel.config().setAllocator(PooledByteBufAllocator.DEFAULT);
return channel;
}
});
解决传输文件的时候爆没有sun buf类的问题
channel.config().setAllocator(PooledByteBufAllocator.DEFAULT);
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询