title: Distinguish between writeTimeout,readTimeout and connectTimeout in Retrofit?
body: <p>I want to post some json string to some URL. I am getting Exception as</p>
  <pre><code> Exception: java.net.SocketTimeoutException: failed to connect to 
  </code></pre>
  <p>searched lot regarding this issue people are suggesting to increase and decrease timeout parameters in retrofit. I want to know difference between writeTimeout, readTimeout and connectTimeout. So that i can trigger SocketTimeoutException.  here my retro client.</p>
  <pre><code>    public static Retrofit getClient() {
  
          HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
          interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
          OkHttpClient client = new OkHttpClient.Builder().writeTimeout(20, TimeUnit.SECONDS).
  //.authenticator(new Authen()).
  
          readTimeout(30, TimeUnit.SECONDS).
                          connectTimeout(20, TimeUnit.SECONDS).
                          addInterceptor(interceptor).build();
  
          return new Retrofit.Builder()
                  .baseUrl(DefinesClass.ITS_URL)
  //                .baseUrl(&quot;https://reqres.in&quot;)
  //                .addConverterFactory(GsonConverterFactory.create())
                  .addConverterFactory(SimpleXmlConverterFactory.create())
                  .client(client)
                  .build();
  
  
      }
  </code></pre>
  <p>Is there any way i can sort that exception help guys?</p>