![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
netty
彦楠
写程序也挺有意思
展开
-
GO使用TCP长连接
3,先启动tcpServer.go,在启动tcpClient.go 就可以看效果了。原创 2023-11-01 14:57:26 · 310 阅读 · 0 评论 -
netty demo 保证可以运行
netty demo地址 https://gitee.com/Kkk9527/netty-dome.git1,运行ObjectServerMain.java 2,运行ObjectClientMain.java 3,看效果netty项目demo pom需要引入 <!-- https://mvnrepository.com/artifact/io.netty/netty-all -->原创 2017-12-19 17:56:49 · 653 阅读 · 0 评论 -
netty获取ip
InetSocketAddress insocket = (InetSocketAddress) ctx.channel().remoteAddress(); String clientIP = insocket.getAddress().getHostAddress(); System.out.println(clientIP);原创 2017-12-14 16:42:00 · 16089 阅读 · 0 评论 -
netty设置读取写入超时
设置SocketChannel private static final long MILLISECONDS=4*1000L;//超时时间 @Override protected void initChannel(SocketChannel ch) throws Exception {原创 2018-01-12 16:29:40 · 6429 阅读 · 2 评论