File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/main/java/com/tans/tfiletransporter/net/filetransporter Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ android {
3838 multiDexEnabled true
3939 minifyEnabled false
4040 proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
41+ signingConfig signingConfigs. debug
4142 }
4243 }
4344 compileOptions {
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ import java.util.concurrent.atomic.AtomicInteger
2626import java.util.concurrent.atomic.AtomicLong
2727import kotlin.math.max
2828
29- // 1.5 MB
30- private const val MULTI_CONNECTIONS_BUFFER_SIZE : Int = 1024 * 1024 + 1024 * 512
29+ // 512KB
30+ private const val MULTI_CONNECTIONS_BUFFER_SIZE : Int = 1024 * 512
3131private const val MULTI_CONNECTIONS_MAX : Int = 30
3232// 10 MB
3333private const val MULTI_CONNECTIONS_MIN_FRAME_SIZE : Long = 1024 * 1024 * 10
@@ -272,6 +272,7 @@ class MultiConnectionsFileTransferClient(
272272 sc.use {
273273 sc.setOptionSuspend(StandardSocketOptions .SO_REUSEADDR , true )
274274 sc.setOptionSuspend(StandardSocketOptions .TCP_NODELAY , true )
275+ sc.setOptionSuspend(StandardSocketOptions .SO_KEEPALIVE , true )
275276 sc.connectSuspend(InetSocketAddress (serverAddress, MULTI_CONNECTIONS_FILES_TRANSFER_LISTEN_PORT ))
276277 sc.writeSuspendSize(buffer, md5)
277278 sc.writeSuspendSize(buffer, start.toBytes())
You can’t perform that action at this time.
0 commit comments