connection timeout & socket timeout

A connection timeout occurs only upon starting the TCP connection. This usually happens if the remote machine does not answer. This means that the server has been shut down, you used the wrong IP/DNS name or the network connection to the server is down.
链接超时只发生在TCP链接开始的时候。如果远程机器没有响应,通常发生链接超时。这意味着服务器关机了,你用了错误的IP/DNS名,或者通向这台server的网络断了。

A socket timeout is dedicated to monitor the continuous incoming data flow. If the data flow is interrupted for the specified timeout the connection is regarded as stalled/broken. Of course this only works with connections where data is received all the time.
套接字超时专用于监控持续传来的数据流。如果数据流因为特定的超时中断,链接就被视为中断了。当然,这只针对那些一直在接收数据的链接。

http://stackoverflow.com/questions/7360520/connectiontimeout-versus-sockettimeout

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,936评论 0 0
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,969评论 19 139
  • Redis 配置文件示例 注意:想要读取配置文件,Redis的第一个参数必须是文件的路径 ./redis-serv...
    起个名忒难阅读 1,230评论 0 1
  • 现代女性肩负着更多责任和义务,这其中有社会给予的,也有个人要求的,比如,女性要做好妻子、母亲的角色,也要实现自己的...
    风里雨里我等你阅读 541评论 0 5
  • LoRa AT 命令还需要调试固件,先用Python通过串口仿真一下我们定义的Class A设备。如果需要开发主机...
    小鱼儿他老汉阅读 173评论 0 0