summaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorEdoardo La Greca2025-08-01 17:01:40 +0200
committerEdoardo La Greca2025-08-01 17:01:40 +0200
commit2023a7f6e36a408ee61afea1148053a49b06eb35 (patch)
tree0825526bfa12297b1c7d507138c72081f5a188f5 /src/main/kotlin
parenta18d9f1149dfda07c1bdd8fd50dbe20c83f25741 (diff)
add throws info in documentation and remove initializer in waitForTag
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/NinePConnection.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/NinePConnection.kt b/src/main/kotlin/NinePConnection.kt
index ccac9c5..3c7c622 100644
--- a/src/main/kotlin/NinePConnection.kt
+++ b/src/main/kotlin/NinePConnection.kt
@@ -96,11 +96,12 @@ class NinePConnection(netPackTrans: NetworkPacketTransporter) : NinePTranslator
*
* @param tag The tag to wait for.
* @return A pair of (1) the size and (2) the type of the message that matches the given tag.
+ * @throws java.io.IOException if the message could not be correctly received.
*/
private fun waitForTag(tag: UShort): Pair<UInt, NinePMessageType> {
var s = 0u
var ty: NinePMessageType? = null
- var ta: UShort = 0u
+ var ta: UShort
var found = false
while (!found) {
val stt = readSizeTypeTag()