golang设置socket的连接超时

timeoutSec := 10
sock.SetReadDeadline(time.Now().Add(timeoutSec * time.Second)

posted @ 2016-09-11 11:43  aoper  阅读(854)  评论(0编辑  收藏  举报