java.net.sockettimeoutexception read timed out
生活随笔
收集整理的這篇文章主要介紹了
java.net.sockettimeoutexception read timed out
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
java.net.sockettimeoutexception read timed out
?????*?The?timeout?of?the?read()?of?this?socket's?input?stream?(in?milliseconds)
?????*/
????private?int?soTimeout?=?100;
????/**
?????*?timeout?for?connect?and?close
?????*/
????protected?long?timeout?=?60?*?1000;
????/**
?????*?retry?timeout?in?millisecods
?????*/
????protected?int?retryTimeout?=?60?*?1000;
????/**
?????*?maximum?retry?timeout?allowed
?????*/
????protected?int?maxRetryTimeout?=?MAXRETRYTIMEOUT;
?
超時(shí)時(shí)間設(shè)長(zhǎng)一點(diǎn)兒即可
Socket.setSoTimeout(int timeout);
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
注意下面幾個(gè)超時(shí)時(shí)間(soTimeout只有100毫秒)
?????*?The?timeout?of?the?read()?of?this?socket's?input?stream?(in?milliseconds)
?????*/
????private?int?soTimeout?=?100;
????/**
?????*?timeout?for?connect?and?close
?????*/
????protected?long?timeout?=?60?*?1000;
????/**
?????*?retry?timeout?in?millisecods
?????*/
????protected?int?retryTimeout?=?60?*?1000;
????/**
?????*?maximum?retry?timeout?allowed
?????*/
????protected?int?maxRetryTimeout?=?MAXRETRYTIMEOUT;
?
?
?
?
?
總結(jié)
以上是生活随笔為你收集整理的java.net.sockettimeoutexception read timed out的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 微软:Vista SP2是最安全的操作系
- 下一篇: 59、crontab用法简介