![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
netty
王小强-
这个作者很懒,什么都没留下…
展开
-
netty服务端http
nettyserverpackage com.wq.netty;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelFuture;import io.netty.channel.EventLoopGroup;import io.netty.channel.nio.NioEventLoopG...原创 2019-07-12 17:53:59 · 343 阅读 · 0 评论 -
netty聊天多客户端访问服务端
MyChatServerpackage com.wq.nettychat;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelFuture;import io.netty.channel.EventLoopGroup;import io.netty.channel.nio.NioEven...原创 2019-07-12 17:57:11 · 1009 阅读 · 0 评论 -
netty长连接
MyServerpackage com.wq.nettylongconnection;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelFuture;import io.netty.channel.EventLoopGroup;import io.netty.channel.nio.N...原创 2019-07-12 18:03:24 · 356 阅读 · 0 评论 -
Netty中Protobuf多协议消息支撑
先定义.proto文件,其中定义一个枚举DateType标识不同的消息类别,然后oneof定义Mymessage中的dataBody只能是Person、Dog、Cat中的一种。然后使用protobuf编译器编译,编译命令:protoc --java_out=src/main/java src/protobuf/Person.protosyntax = "proto2";package c...原创 2019-07-09 14:33:42 · 521 阅读 · 0 评论