netty4.0.23 初学的demo

netty-all-4.0.23.jar netty通信所需jar包,最新jar包。个人使用的nettyjar包。 立即下载


netty4.0.23 初学的demo

 

例子共4个文件,用到的jar包有:

netty-all-4.0.23.Final.jar

log4j.jar (apache的)

commons-logging-1.1.1.jar(apache的)

 

文件 TcpServerHandler

 

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.channel.ChannelHandlerContext;  
  6. import io.netty.channel.SimpleChannelInboundHandler;  
  7.   
  8. public class TcpServerHandler extends SimpleChannelInboundHandler<Object> {  
  9.   
  10.     private static final Logger logger = Logger.getLogger(TcpServerHandler.class);  
  11.   
  12.     @Override  
  13.     protected void channelRead0(ChannelHandlerContext ctx, Object msg)  
  14.             throws Exception {  
  15.         logger.info("SERVER接收到消息:"+msg);  
  16.         ctx.channel().writeAndFlush("yes, server is accepted you ,nice !"+msg);  
  17.     }  
  18.       
  19.     @Override  
  20.     public void exceptionCaught(ChannelHandlerContext ctx,  
  21.             Throwable cause) throws Exception {  
  22.         logger.warn("Unexpected exception from downstream.", cause);  
  23.         ctx.close();  
  24.     }  
  25.   
  26. }  

 

 

文件 TcpServer

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.bootstrap.ServerBootstrap;  
  6. import io.netty.channel.ChannelInitializer;  
  7. import io.netty.channel.ChannelPipeline;  
  8. import io.netty.channel.EventLoopGroup;  
  9. import io.netty.channel.nio.NioEventLoopGroup;  
  10. import io.netty.channel.socket.SocketChannel;  
  11. import io.netty.channel.socket.nio.NioServerSocketChannel;  
  12. import io.netty.handler.codec.LengthFieldBasedFrameDecoder;  
  13. import io.netty.handler.codec.LengthFieldPrepender;  
  14. import io.netty.handler.codec.string.StringDecoder;  
  15. import io.netty.handler.codec.string.StringEncoder;  
  16. import io.netty.util.CharsetUtil;  
  17.   
  18. public class TcpServer {  
  19.   
  20.     private static final Logger logger = Logger.getLogger(TcpServer.class);  
  21.     private static final String IP = "127.0.0.1";  
  22.     private static final int PORT = 9999;  
  23.     /**用于分配处理业务线程的线程组个数 */  
  24.     protected static final int BIZGROUPSIZE = Runtime.getRuntime().availableProcessors()*2; //默认  
  25.     /** 业务出现线程大小*/  
  26.     protected static final int BIZTHREADSIZE = 4;  
  27.         /* 
  28.      * NioEventLoopGroup实际上就是个线程池, 
  29.      * NioEventLoopGroup在后台启动了n个NioEventLoop来处理Channel事件, 
  30.      * 每一个NioEventLoop负责处理m个Channel, 
  31.      * NioEventLoopGroup从NioEventLoop数组里挨个取出NioEventLoop来处理Channel 
  32.      */  
  33.     private static final EventLoopGroup bossGroup = new NioEventLoopGroup(BIZGROUPSIZE);  
  34.     private static final EventLoopGroup workerGroup = new NioEventLoopGroup(BIZTHREADSIZE);  
  35.       
  36.     protected static void run() throws Exception {  
  37.         ServerBootstrap b = new ServerBootstrap();  
  38.         b.group(bossGroup, workerGroup);  
  39.         b.channel(NioServerSocketChannel.class);  
  40.         b.childHandler(new ChannelInitializer<SocketChannel>() {  
  41.             @Override  
  42.             public void initChannel(SocketChannel ch) throws Exception {  
  43.                 ChannelPipeline pipeline = ch.pipeline();  
  44.                 pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4));  
  45.                 pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));  
  46.                 pipeline.addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));  
  47.                 pipeline.addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));  
  48.                 pipeline.addLast(new TcpServerHandler());  
  49.             }  
  50.         });  
  51.   
  52.         b.bind(IP, PORT).sync();  
  53.         logger.info("TCP服务器已启动");  
  54.     }  
  55.       
  56.     protected static void shutdown() {  
  57.         workerGroup.shutdownGracefully();  
  58.         bossGroup.shutdownGracefully();  
  59.     }  
  60.   
  61.     public static void main(String[] args) throws Exception {  
  62.         logger.info("开始启动TCP服务器...");  
  63.         TcpServer.run();  
  64. //      TcpServer.shutdown();  
  65.     }  
  66. }  

 

文件 TcpClientHandler

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.channel.ChannelHandlerContext;  
  6. import io.netty.channel.SimpleChannelInboundHandler;  
  7.   
  8. public class TcpClientHandler extends SimpleChannelInboundHandler<Object> {  
  9.   
  10.     private static final Logger logger = Logger.getLogger(TcpClientHandler.class);  
  11.   
  12.     @Override  
  13.     protected void channelRead0(ChannelHandlerContext ctx, Object msg)  
  14.             throws Exception {  
  15.         //messageReceived方法,名称很别扭,像是一个内部方法.  
  16.         logger.info("client接收到服务器返回的消息:"+msg);  
  17.           
  18.     }  
  19.   
  20. }  

 

文件 TcpClient

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import io.netty.bootstrap.Bootstrap;  
  4. import io.netty.channel.Channel;  
  5. import io.netty.channel.ChannelInitializer;  
  6. import io.netty.channel.ChannelOption;  
  7. import io.netty.channel.ChannelPipeline;  
  8. import io.netty.channel.EventLoopGroup;  
  9. import io.netty.channel.nio.NioEventLoopGroup;  
  10. import io.netty.channel.socket.nio.NioSocketChannel;  
  11. import io.netty.handler.codec.LengthFieldBasedFrameDecoder;  
  12. import io.netty.handler.codec.LengthFieldPrepender;  
  13. import io.netty.handler.codec.string.StringDecoder;  
  14. import io.netty.handler.codec.string.StringEncoder;  
  15. import io.netty.util.CharsetUtil;  
  16.   
  17. import org.apache.log4j.Logger;  
  18.   
  19. public class TcpClient {  
  20.     private static final Logger logger = Logger.getLogger(TcpClient.class);  
  21.     public static String HOST = "127.0.0.1";  
  22.     public static int PORT = 9999;  
  23.       
  24.     public static Bootstrap bootstrap = getBootstrap();  
  25.     public static Channel channel = getChannel(HOST,PORT);  
  26.     /** 
  27.      * 初始化Bootstrap 
  28.      * @return 
  29.      */  
  30.     public static final Bootstrap getBootstrap(){  
  31.         EventLoopGroup group = new NioEventLoopGroup();  
  32.         Bootstrap b = new Bootstrap();  
  33.         b.group(group).channel(NioSocketChannel.class);  
  34.         b.handler(new ChannelInitializer<Channel>() {  
  35.             @Override  
  36.             protected void initChannel(Channel ch) throws Exception {  
  37.                 ChannelPipeline pipeline = ch.pipeline();  
  38.                 pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4));  
  39.                 pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));  
  40.                 pipeline.addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));  
  41.                 pipeline.addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));  
  42.                 pipeline.addLast("handler", new TcpClientHandler());  
  43.             }  
  44.         });  
  45.         b.option(ChannelOption.SO_KEEPALIVE, true);  
  46.         return b;  
  47.     }  
  48.   
  49.     public static final Channel getChannel(String host,int port){  
  50.         Channel channel = null;  
  51.         try {  
  52.             channel = bootstrap.connect(host, port).sync().channel();  
  53.         } catch (Exception e) {  
  54.             logger.error(String.format("连接Server(IP[%s],PORT[%s])失败", host,port),e);  
  55.             return null;  
  56.         }  
  57.         return channel;  
  58.     }  
  59.   
  60.     public static void sendMsg(String msg) throws Exception {  
  61.         if(channel!=null){  
  62.             channel.writeAndFlush(msg).sync();  
  63.         }else{  
  64.             logger.warn("消息发送失败,连接尚未建立!");  
  65.         }  
  66.     }  
  67.   
  68.     public static void main(String[] args) throws Exception {  
  69.         try {  
  70.             long t0 = System.nanoTime();  
  71.             for (int i = 0; i < 100000; i++) {  
  72.                 TcpClient.sendMsg(i+"你好1");  
  73.             }  
  74.             long t1 = System.nanoTime();  
  75.             System.out.println((t1-t0)/1000000.0);  
  76.         } catch (Exception e) {  
  77.             e.printStackTrace();  
  78.         }  
  79.     }  
  80. }  

 

 

netty4.0.23 初学的demo

 

例子共4个文件,用到的jar包有:

netty-all-4.0.23.Final.jar

log4j.jar (apache的)

commons-logging-1.1.1.jar(apache的)

 

文件 TcpServerHandler

 

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.channel.ChannelHandlerContext;  
  6. import io.netty.channel.SimpleChannelInboundHandler;  
  7.   
  8. public class TcpServerHandler extends SimpleChannelInboundHandler<Object> {  
  9.   
  10.     private static final Logger logger = Logger.getLogger(TcpServerHandler.class);  
  11.   
  12.     @Override  
  13.     protected void channelRead0(ChannelHandlerContext ctx, Object msg)  
  14.             throws Exception {  
  15.         logger.info("SERVER接收到消息:"+msg);  
  16.         ctx.channel().writeAndFlush("yes, server is accepted you ,nice !"+msg);  
  17.     }  
  18.       
  19.     @Override  
  20.     public void exceptionCaught(ChannelHandlerContext ctx,  
  21.             Throwable cause) throws Exception {  
  22.         logger.warn("Unexpected exception from downstream.", cause);  
  23.         ctx.close();  
  24.     }  
  25.   
  26. }  

 

 

文件 TcpServer

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.bootstrap.ServerBootstrap;  
  6. import io.netty.channel.ChannelInitializer;  
  7. import io.netty.channel.ChannelPipeline;  
  8. import io.netty.channel.EventLoopGroup;  
  9. import io.netty.channel.nio.NioEventLoopGroup;  
  10. import io.netty.channel.socket.SocketChannel;  
  11. import io.netty.channel.socket.nio.NioServerSocketChannel;  
  12. import io.netty.handler.codec.LengthFieldBasedFrameDecoder;  
  13. import io.netty.handler.codec.LengthFieldPrepender;  
  14. import io.netty.handler.codec.string.StringDecoder;  
  15. import io.netty.handler.codec.string.StringEncoder;  
  16. import io.netty.util.CharsetUtil;  
  17.   
  18. public class TcpServer {  
  19.   
  20.     private static final Logger logger = Logger.getLogger(TcpServer.class);  
  21.     private static final String IP = "127.0.0.1";  
  22.     private static final int PORT = 9999;  
  23.     /**用于分配处理业务线程的线程组个数 */  
  24.     protected static final int BIZGROUPSIZE = Runtime.getRuntime().availableProcessors()*2; //默认  
  25.     /** 业务出现线程大小*/  
  26.     protected static final int BIZTHREADSIZE = 4;  
  27.         /* 
  28.      * NioEventLoopGroup实际上就是个线程池, 
  29.      * NioEventLoopGroup在后台启动了n个NioEventLoop来处理Channel事件, 
  30.      * 每一个NioEventLoop负责处理m个Channel, 
  31.      * NioEventLoopGroup从NioEventLoop数组里挨个取出NioEventLoop来处理Channel 
  32.      */  
  33.     private static final EventLoopGroup bossGroup = new NioEventLoopGroup(BIZGROUPSIZE);  
  34.     private static final EventLoopGroup workerGroup = new NioEventLoopGroup(BIZTHREADSIZE);  
  35.       
  36.     protected static void run() throws Exception {  
  37.         ServerBootstrap b = new ServerBootstrap();  
  38.         b.group(bossGroup, workerGroup);  
  39.         b.channel(NioServerSocketChannel.class);  
  40.         b.childHandler(new ChannelInitializer<SocketChannel>() {  
  41.             @Override  
  42.             public void initChannel(SocketChannel ch) throws Exception {  
  43.                 ChannelPipeline pipeline = ch.pipeline();  
  44.                 pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4));  
  45.                 pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));  
  46.                 pipeline.addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));  
  47.                 pipeline.addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));  
  48.                 pipeline.addLast(new TcpServerHandler());  
  49.             }  
  50.         });  
  51.   
  52.         b.bind(IP, PORT).sync();  
  53.         logger.info("TCP服务器已启动");  
  54.     }  
  55.       
  56.     protected static void shutdown() {  
  57.         workerGroup.shutdownGracefully();  
  58.         bossGroup.shutdownGracefully();  
  59.     }  
  60.   
  61.     public static void main(String[] args) throws Exception {  
  62.         logger.info("开始启动TCP服务器...");  
  63.         TcpServer.run();  
  64. //      TcpServer.shutdown();  
  65.     }  
  66. }  

 

文件 TcpClientHandler

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import org.apache.log4j.Logger;  
  4.   
  5. import io.netty.channel.ChannelHandlerContext;  
  6. import io.netty.channel.SimpleChannelInboundHandler;  
  7.   
  8. public class TcpClientHandler extends SimpleChannelInboundHandler<Object> {  
  9.   
  10.     private static final Logger logger = Logger.getLogger(TcpClientHandler.class);  
  11.   
  12.     @Override  
  13.     protected void channelRead0(ChannelHandlerContext ctx, Object msg)  
  14.             throws Exception {  
  15.         //messageReceived方法,名称很别扭,像是一个内部方法.  
  16.         logger.info("client接收到服务器返回的消息:"+msg);  
  17.           
  18.     }  
  19.   
  20. }  

 

文件 TcpClient

Java代码  收藏代码
  1. package test.netty;  
  2.   
  3. import io.netty.bootstrap.Bootstrap;  
  4. import io.netty.channel.Channel;  
  5. import io.netty.channel.ChannelInitializer;  
  6. import io.netty.channel.ChannelOption;  
  7. import io.netty.channel.ChannelPipeline;  
  8. import io.netty.channel.EventLoopGroup;  
  9. import io.netty.channel.nio.NioEventLoopGroup;  
  10. import io.netty.channel.socket.nio.NioSocketChannel;  
  11. import io.netty.handler.codec.LengthFieldBasedFrameDecoder;  
  12. import io.netty.handler.codec.LengthFieldPrepender;  
  13. import io.netty.handler.codec.string.StringDecoder;  
  14. import io.netty.handler.codec.string.StringEncoder;  
  15. import io.netty.util.CharsetUtil;  
  16.   
  17. import org.apache.log4j.Logger;  
  18.   
  19. public class TcpClient {  
  20.     private static final Logger logger = Logger.getLogger(TcpClient.class);  
  21.     public static String HOST = "127.0.0.1";  
  22.     public static int PORT = 9999;  
  23.       
  24.     public static Bootstrap bootstrap = getBootstrap();  
  25.     public static Channel channel = getChannel(HOST,PORT);  
  26.     /** 
  27.      * 初始化Bootstrap 
  28.      * @return 
  29.      */  
  30.     public static final Bootstrap getBootstrap(){  
  31.         EventLoopGroup group = new NioEventLoopGroup();  
  32.         Bootstrap b = new Bootstrap();  
  33.         b.group(group).channel(NioSocketChannel.class);  
  34.         b.handler(new ChannelInitializer<Channel>() {  
  35.             @Override  
  36.             protected void initChannel(Channel ch) throws Exception {  
  37.                 ChannelPipeline pipeline = ch.pipeline();  
  38.                 pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4));  
  39.                 pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));  
  40.                 pipeline.addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));  
  41.                 pipeline.addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));  
  42.                 pipeline.addLast("handler", new TcpClientHandler());  
  43.             }  
  44.         });  
  45.         b.option(ChannelOption.SO_KEEPALIVE, true);  
  46.         return b;  
  47.     }  
  48.   
  49.     public static final Channel getChannel(String host,int port){  
  50.         Channel channel = null;  
  51.         try {  
  52.             channel = bootstrap.connect(host, port).sync().channel();  
  53.         } catch (Exception e) {  
  54.             logger.error(String.format("连接Server(IP[%s],PORT[%s])失败", host,port),e);  
  55.             return null;  
  56.         }  
  57.         return channel;  
  58.     }  
  59.   
  60.     public static void sendMsg(String msg) throws Exception {  
  61.         if(channel!=null){  
  62.             channel.writeAndFlush(msg).sync();  
  63.         }else{  
  64.             logger.warn("消息发送失败,连接尚未建立!");  
  65.         }  
  66.     }  
  67.   
  68.     public static void main(String[] args) throws Exception {  
  69.         try {  
  70.             long t0 = System.nanoTime();  
  71.             for (int i = 0; i < 100000; i++) {  
  72.                 TcpClient.sendMsg(i+"你好1");  
  73.             }  
  74.             long t1 = System.nanoTime();  
  75.             System.out.println((t1-t0)/1000000.0);  
  76.         } catch (Exception e) {  
  77.             e.printStackTrace();  
  78.         }  
  79.     }  
  80. }  

 

 

Netty-all-4.0.23.Final.jar Netty-all-4.0.23.Final.jar netty-3.6.3.Final.jar 两个版本 立即下载

相关推荐

netty jar包

netty jar包,Netty提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可靠性的网络服务器和客户端程序。

网络通信编程----Netty使用

Netty使用

qq_41273137的博客 615

netty-all-4.1.22.Final.jar netty最新版jar包,直接导入

建立管理长连接、推送、通知、数据传输、自定义协议等等 Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. 'Quick and easy' doesn't mean that a resulting application will suffer from a maintainability or a performance issue. Netty has been designed carefully with the experiences earned from the implementation of a lot of protocols such as FTP, SMTP, HTTP, and various binary and text-based legacy protocols. As a result, Netty has succeeded to find a way to achieve ease of development, performance, stability, and flexibility without a compromise.

netty的jar包依赖

<dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.43.Final</version> </dependency>

weixin_40857858的博客 1850

netty-all-4.0.25.Final.jar

netty-all-4.0.25.Final.jar 支持ssl,最新的final版本

netty-all-4.0.13.Final.jar netty jar包

netty jar包,http://blog.csdn.net/hueason

自己的Java学习路线

时间 技术栈 教程名字(时长) 2021.1-2021.3 JavaSE 动力节点·Java零基础教程视频(适合Java 0基础,Java初学入门)183:34:46 2021.3-2021.4 Mysql 动力节点·MySQL基础入门到精通视频教程-MySQL数据库实战(内含MySQL34道面试题)16:33:26 2021.3.25-2021.3.27 Maven 动力节点·2020最新Maven教程-Maven基础篇之Maven实战入门 5:52:53 Spring B...

大白的成长之路 1196

低功耗和UPF介绍

参考[UPF]低功耗(Low Power Design)and UPF介紹

青春易逝,愿不负昭华,期待梦与远方 1万+

在线聊天室的实现(1)--websocket协议和javascript版的api

转自http://www.cnblogs.com/mumuxinfei/p/4679977.html 前言:   大家刚学socket编程的时候, 往往以聊天室作为学习DEMO, 实现简单且上手容易. 该Demo被不同语言实现和演绎, 网上相关资料亦不胜枚举. 以至于很多技术书籍在讲解网络相关的编程时, 不再采用聊天室做为基础案列, 而采用其他案例. 比如之前火热一时的"你猜我画",

charleslei的专栏 2994

IDEA类和方法注释模板设置(非常详细)

IDEA类和方法注释模板设置(非常详细)

黑桃A的博客 10万+

国密(3)- 预主密钥/主密钥计算和Finished消息的加解密

国密的ECC-SM3-SM4-CBC模式下的预主密钥和主密钥的生成过程介绍,以及Finished消息的加解密介绍

weixin_43408952的博客 6513

生产者消费者问题:高并发系统稳定性核心原理与实战

生产者消费者问题本质是多线程/多进程协作中数据流节奏失衡引发的系统性风险,其底层原理在于缓冲区容量、处理速率差与背压机制三者的动态博弈。该模型直接决定消息队列吞吐、线程池稳定性、实时服务延迟等关键技术指标,广泛应用于订单系统、IoT数据采集、风控引擎等高并发场景。理解其在Java阻塞队列、Kafka offset管理、Disruptor环形缓冲区中的差异化实现,是构建可监控、可降级、可伸缩分布式系统的前提。本文聚焦真实线上问题——如无界队列导致OOM、notifyAll引发唤醒风暴、消费者CPU 100%实

weixin_34067102的博客 664

Windows 11下Dify安装部署实战指南

本文详细介绍在Windows 11环境下部署开源LLM应用开发平台Dify的完整流程。涵盖环境准备(WSL 2启用、Docker Desktop安装配置)、源码获取、Docker容器化部署、数据库初始化、服务启动验证等核心步骤。包括环境变量配置、性能优化、安全加固、端口冲突解决、数据库连接故障排查等关键技术要点。为开发者提供从零到一的Dify本地化部署实战指南

weixin_44269410的博客 852

AIGC 应用工程师(5-10年)面试题与答案全解析(2026 前沿版)

AIGC 应用工程师面试题与答案全解析(2026 前沿版) 摘要 本文系统整理了 2026 年 AIGC 应用工程师岗位的核心面试内容,包含 19 大模块、68 道关键题目及 15+ 代码示例。内容覆盖: 岗位定位:强调工程落地能力(RAG、Agent、系统集成)与业务闭环思维 技术体系:从基础理论(Transformer、涌现能力)到前沿应用(MCP协议、多模态生成) 工程实践:包含推理优化、成本控制、安全合规等关键落地能力 评估体系:详细讲解 golden set 构建、LLM-as-judge 等评估

weixin_48053866的博客 821

SAP 公司间采购简介

SAP公司间采购(Intercompany Procurement)是指企业集团内部不同法人实体之间的采购和销售流程。这种流程在跨国公司或有多个独立运营子公司的企业中非常常见。SAP提供了标准的功能来处理公司间采购,确保财务和物流流程的透明性和效率。以下是SAP公司间采购的基本流程及其相关模块的简介。

我小时候很黑的博客 1381

YOLOv11改进 | Mamba-YOLOv11-L:基于SSM的高效全局建模,精度与效率的双重突破

摘要: 本文提出Mamba-YOLOv11-L,通过集成状态空间模型(SSM)改进YOLOv11的全局建模能力。针对YOLOv11在复杂场景中全局依赖缺失、精度-效率矛盾等问题,SSM以$O(N)$计算复杂度实现长程语义捕捉。改进后的模型在工业缺陷检测(Recall↑12%)、边缘设备部署(内存↓16%)、多尺度目标检测(小目标mAP↑9%)等场景表现优异,推理速度保持>40 FPS。核心创新包括轻量化SSM模块设计(稀疏状态转移+局部上下文融合)及与YOLOv11骨干的深度集成,代码实现展示了SSM

走向CTO的路上... 572

Java 21 到 Java 26 新特性详解:虚拟线程、模式匹配、结构化并发、HTTP/3 与 AOT

本文系统梳理 Java 21 到 Java 26 的核心新特性与演进路线,重点讲解虚拟线程、记录模式与 `switch` 模式匹配、结构化并发、Scoped Values、HTTP/3 和 AOT 缓存,并介绍 FFM API、Stream Gatherers、Class-File API、垃圾收集器及平台安全机制的变化。文章结合完整代码示例,明确区分正式、预览、孵化器和实验性特性,同时给出版本选型、性能验证、兼容性检查及生产环境渐进升级建议,帮助开发者理解新版 Java 的实际价值与使用边界。

qq_29029209的博客 448

下载和运行GitHub上的代码教程总结

从昨天开始就想着从GitHub上下载一个开源的Vue的实战项目,希望能从中学习更多的Vue的实用内容,结果搞了半天好不容易下载了,不知道怎么弄。然而,今天终于成功了,激动地我赶紧来记录一下。 如何从GitHub上下载自己需要的项目: 1.首先,你要有一个自己的GitHub(https://github.com/)的账号。关于如何注册GitHub的账号以及如何获取你的SSH密钥这个问题,请大家参...

不怕万人阻挡,只怕自己投降 29万+

Netty框架的下载

1.Netty框架Jar包的下载: 上图中标记的点都需要√上,并且文件夹的位置表示,会将下载好的Netty中的相关文件放在指定的目录下的lib文件夹下面。 然后点击搜索,在下拉框中选择合适的版本进行下载 ...

weixin_42030357的博客 1096

TC3XX - MCAL知识点(三十八):AURIX™ TC3xx 的EDSADC实现旋变解码功能(理论知识+手册阅读)

本文系统梳理了英飞凌AURIX系列芯片EDSADC模块的技术手册内容。首先概述了该模块的架构特点,包括模拟/数字输入通道和总线地址信息。重点解析了手册中的关键知识点:1)模拟量输入的差分/单端模式;2)数字量连接的触发、数据源和时钟源选择;3)功能配置中的寄存器操作注意事项;4)输入通道的三种数据来源模式;5)滤波器链的组成和工作原理;6)旋变应用中的载波信号生成和延迟补偿机制。最后对SRM、SAUL、SBLL等专业术语进行了详细解释。全文为理解EDSADC模块的硬件特性和配置方法提供了系统的技术参考。

梦想技术家 596

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

netty入门学习

本文简单介绍下netty。Netty是由JBOSS提供的一个java开源框架。Netty提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可靠性的网络服务器和客户端程序。

peace唠叨 2109

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

这么说吧,Netty很简单,其实就是个Jar包,是作为通讯组件用的

今天,我们用简单点的语言来描述NettyNetty是什么?0 ) 关键词:Netty、NIO、异步、通讯、1)本质:一个Jar包,一个NIO框架,是对 socket 网络编程的优秀包装2)作用:既然netty 是对 socket 网络编程的优秀包装.那么在没有Netty之前,jdk强迫你必须用socket来写服务器,实际上是很繁琐的,缺乏一个高层次的api...

Java进阶架构师 2683

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

上一篇: github开通,史上最全demo集合,各种demo持续更新中
下一篇: socket的标准参数
hxpjava1
博客等级 码龄19年 1365粉丝 511原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值