最近看到阿里的一位童鞋写的一本关于分布式的书,感觉不错,准备把这本书上基础的代码都写一写. /** * Created by LiuHuiChao on 2016/11/15. * description:based on TCP/IP+BIO to deliver the message */ public class TCP_IP_BIO { /** * client端 * @throws IOException */ @Test public void startCli
/** * Created by LiuHuiChao on 2016/11/15. * description:based on TCP/IP+NIO to deliver the message */ public class TCP_IP_NIO { @Test public void clientStart() throws IOException { SocketChannel channel=SocketChannel.open(); channel.configureBlockin