lihongzheshuai / lihongzheshuai.github.io

onecoder's blog.
https://onecoder-blog.vercel.app
MIT License
6 stars 2 forks source link

Netty4自学笔记 (1) - Java BIO #306

Open lihongzheshuai opened 6 years ago

lihongzheshuai commented 6 years ago

http://www.coderli.com/netty4-java-bio/#

FreedomBX commented 6 years ago

写的不错,打赏一分钱以示鼓励~~

lihongzheshuai commented 6 years ago

@FreedomBX 谢谢鼓励,险些骄傲

yuanjinzhong commented 5 years ago

Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind at java.net.DualStackPlainSocketImpl.bind0(Native Method) at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190) at java.net.Socket.bind(Socket.java:644) at com.yjz.middleware.netty.one_BIO.BioClient.main(BioClient.java:20)

yuanjinzhong commented 5 years ago

Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind at java.net.DualStackPlainSocketImpl.bind0(Native Method) at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190) at java.net.Socket.bind(Socket.java:644) at com.yjz.middleware.netty.one_BIO.BioClient.main(BioClient.java:20) 楼主 这是什么情况? 客户端链接socket的时候报这个错,求指导!

yuanjinzhong commented 5 years ago

不好意思,我的问题! 客户端这边我写的socket.bind()!

lihongzheshuai commented 5 years ago

@yuanjinzhong 嗯,提示的意思就是端口冲突了。多次绑定同一端口导致的。