go net.Conn 可以非阻塞地判断是否可读吗?

wubbalubbaaa · 2021-12-28 17:29:07 · 1472 次点击

你是不是需要:

beforeRead()
for {
    c.Read(buf)
}
#3
更多评论
jan-bar
想要拥有,必定付出。

我感觉你需要peek一下,我以前弄数据读的时候用peek探测能读多少数据。

#2