栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Golang中的默认HTTP拨号超时值

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Golang中的默认HTTP拨号超时值

根据http://golang.org/pkg/net/#Dialer:

type Dialer struct {        // Timeout is the maximum amount of time a dial will wait for        // a connect to complete. If Deadline is also set, it may fail        // earlier.        //        // The default is no timeout.        //        // With or without a timeout, the operating system may impose        // its own earlier timeout. For instance, TCP timeouts are        // often around 3 minutes.

因此,默认超时(不考虑操作系统施加的限制)为无。

可以使用设置超时

SetDeadline

我认为默认的OSX超时可以通过进行检查

sysctl net.inet.tcp



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/448211.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号