use of com.fanap.podchat.networking.retrofithelper.TimeoutConfig in project pod-chat-android-sdk by FanapSoft.
the class ChatPresenter method connect.
@Override
public void connect(RequestConnect requestConnect) {
NetworkPingSender.NetworkStateConfig build = new NetworkPingSender.NetworkStateConfig().setHostName("msg.pod.ir").setPort(443).setDisConnectionThreshold(2).setInterval(7000).setConnectTimeout(10000).build();
// TimeoutConfig uploadConfig = new TimeoutConfig()
// .newConfigBuilder()
// .withConnectTimeout(120, TimeUnit.MINUTES)
// .withWriteTimeout(120, TimeUnit.MINUTES)
// .withReadTimeout(120, TimeUnit.MINUTES)
// .build();
TimeoutConfig downloadConfig = new TimeoutConfig().newConfigBuilder().withConnectTimeout(20, TimeUnit.SECONDS).withWriteTimeout(0, TimeUnit.SECONDS).withReadTimeout(5, TimeUnit.MINUTES).build();
chat.setNetworkStateConfig(build);
//
// chat.setUploadConfig(uploadConfig);
//
// chat.setDownloadConfig(downloadConfig);
chat.connect(requestConnect);
}
use of com.fanap.podchat.networking.retrofithelper.TimeoutConfig in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method connect.
public void connect(RequestConnect requestConnect) {
NetworkPingSender.NetworkStateConfig build = new NetworkPingSender.NetworkStateConfig().setHostName("msg.pod.ir").setPort(443).setDisConnectionThreshold(2).setInterval(7000).setConnectTimeout(10000).build();
// TimeoutConfig uploadConfig = new TimeoutConfig()
// .newConfigBuilder()
// .withConnectTimeout(120, TimeUnit.MINUTES)
// .withWriteTimeout(120, TimeUnit.MINUTES)
// .withReadTimeout(120, TimeUnit.MINUTES)
// .build();
TimeoutConfig downloadConfig = new TimeoutConfig().newConfigBuilder().withConnectTimeout(20, TimeUnit.SECONDS).withWriteTimeout(0, TimeUnit.SECONDS).withReadTimeout(5, TimeUnit.MINUTES).build();
chat.setNetworkStateConfig(build);
//
// chat.setUploadConfig(uploadConfig);
//
// chat.setDownloadConfig(downloadConfig);
chat.connect(requestConnect);
}
Aggregations