ABC123
ABC123

Reputation: 133

Which timer does the setSoTimeout method in java change?

Is it the Re-transmission,Keep-alive,Persistence,Time-Wait Timer,ect? Also does udp use the same timers as tcp, if not what timers does udp use?

Upvotes: 0

Views: 36

Answers (1)

Thomas Weller
Thomas Weller

Reputation: 59279

It does not change a timer (which is something like a clock), it changes a timeout (which is a timespan to wait for something).

The docs explains it quite well: it clearly says that read() operations on a socket are affected.

And since it is an instance method, it applies to that Socket instance only on which the call is made.

Upvotes: 1

Related Questions