摘要:
在Netty中提供了ChannelGroup接口,该接口继承Set接口,因此可以通过ChannelGroup可管理服务器端所有的连接的Channel,然后对所有的连接Channel广播消息。Server端:public class BroadCastServer { public static... 阅读全文
posted @ 2015-10-02 18:05
韩要奋斗
阅读(20273)
评论(7)
推荐(2)
摘要:
本文基于Nett4.0.26.Final版本浅析Client与Server端通讯,先看服务器端:public class Server { public static void run(int port) { /**Netty创建ServerSocketChannel,默认Sel... 阅读全文
posted @ 2015-10-02 10:11
韩要奋斗
阅读(3263)
评论(0)
推荐(0)