mirror of
https://github.com/fumiama/simple-dict-android.git
synced 2026-06-05 00:30:24 +08:00
v2.0.1
1. 增加设置/删除鉴权 2. 设置时自动去除多余空格并转换为半角 3. 修复无网络的可能闪退
This commit is contained in:
@@ -71,9 +71,11 @@ class Client(private val ip: String, private val port: Int) {
|
||||
var a: Int
|
||||
do {
|
||||
a = din?.read(inMessage)?:0 //a存储返回消息的长度
|
||||
re += inMessage.copyOf(a)
|
||||
Log.d("MyC", "reply length:$a")
|
||||
if(totalSize < 0 && a < bufferSize) break
|
||||
if(a > 0) {
|
||||
re += inMessage.copyOf(a)
|
||||
Log.d("MyC", "reply length:$a")
|
||||
if(totalSize < 0 && a < bufferSize) break
|
||||
} else break
|
||||
} while (totalSize > re.size)
|
||||
} else Log.d("MyC", "no connect to receive message")
|
||||
} catch (e: IOException) {
|
||||
|
||||
Reference in New Issue
Block a user