2020
10-10
10-10
SpringBoot+Netty+WebSocket实现消息发送的示例代码
一.导入Netty依赖<dependency><groupId>io.netty</groupId><artifactId>netty-all</artifactId><version>4.1.25.Final</version></dependency>二.搭建websocket服务器@ComponentpublicclassWebSocketServer{/***主线程池*/privateEventLoopGroupbossGroup;/***工作线程池*/privateEventLoopGroupworkerGroup;/***服务器*/privateServerBootstrapserver;/***回调*/privateChannel...
继续阅读 >