آموزش های این وب سایت به صورت رایگان در دسترس است. اطلاعات بیشتر
بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]

سوال در مورد socketTimeout و connectionTimeout

Pr0gramm3r  10 سال پیش  10 سال پیش
0 0

سلام

ممنون میشم در مورد این دو تا توضیح بدید و مقدار مناسب برای ست کردن رو هم نسبت به سرعت اینترنت های مختلف اعلام کنید

0 0
up (10 سال پیش)
+3 0
ConnectionTimeout برای زمانی هست که شما میخواید به سرور وصل بشید ولی تایمش تموم میشه و نمتونه وصل بشه SocketTimeout مربوط بهه زمان دریافت اطلاعات هست (10 سال پیش)
 برای این سوال 2 پاسخ وجود دارد.
پاسخ به سوال 
هادی اکبرزاده  10 سال پیش
+1 0

حال ترجمشو نداشم شرمنده :D

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.
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.
By setting socket timeout to 1 this would require that every millisecond new data is received (assuming that you read the data block wise and the block is large enough)!
If only the incoming stream stalls for more than a millisecond you are running into a timeout.

پاسخ به سوال 
reza  10 سال پیش
0 0


پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .