1 atfeel OP 要哭了,怎么都想不明白,又查不到想要的资料。。。 |
2 1461665214 2022-08-27 17:55:25 +08:00 你好像把 client 端和 server 端实现方式搞混了 |
3 atfeel OP @1461665214 我看不出问题在哪里。。。 |
4 atfeel OP 有哪为 V 友知道的吗,急死我了!!! |
5 cronglong 2022-08-27 21:35:38 +08:00 139.155.182.112 这个机器要 response to 你执行这个代码的机器时,才会触发吧 |
6 atfeel OP @cronglong 不是吧,我还没发任何东西,DNS 服务器怎么可能会主动 response ??我这个是个 DNS 的功能,就是单方面的发送 DNS 查询,等待返回。。 |
![]() | 8 dreamlike 2022-08-28 00:24:50 +08:00 selectionKey.interestOps(SelectionKey.OP_WRITE) 这个等价于 channel.register(selector, SelectionKey.OP_WRITE) 只是声明你需要监听什么事件 并不是触发可写的事件 默认情况下应该是直接 select 出来的就是可写的 |
9 atfeel OP @tairan2006 这段代码,android 和 java 都是一样的结果。。 |
11 1461665214 2022-08-28 21:52:15 +08:00 @atfeel 为啥你 onClick 方法里不用 channel.write 直接写 而在事件循环里去写,我没在客户端代码里这么玩过 |