diff options
author | Edoardo La Greca | 2025-08-07 14:57:13 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-08-07 14:57:13 +0200 |
commit | e281e20e53cb4fb8f051f38a0a16a4e2c56b60ef (patch) | |
tree | 92df8ed1145d92b298f0374c72c592a37c6bf721 /src/main/kotlin | |
parent | eb7efa3b67257b16893224736fc6cf932fe7ae0f (diff) |
change visibility to writeInteger and writeString in OutMessage
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/OutMessage.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/OutMessage.kt b/src/main/kotlin/OutMessage.kt index bc05784..9a3bcfb 100644 --- a/src/main/kotlin/OutMessage.kt +++ b/src/main/kotlin/OutMessage.kt @@ -90,7 +90,7 @@ class OutMessage(val type: NinePMessageType, val tag: UShort, val fieldNames: Li * @param tl The networking API. * @param value The number's value. */ - private fun writeInteger(tl: TransportLayer, value: BigInteger) { + fun writeInteger(tl: TransportLayer, value: BigInteger) { val bytes = value.toByteArray() tl.transmit(Array(bytes.size) { i -> bytes[i].toUByte() }) } @@ -105,7 +105,7 @@ class OutMessage(val type: NinePMessageType, val tag: UShort, val fieldNames: Li * @param value The string. * @throws IllegalArgumentException if the value of the string's size does not fit into 2 bytes. */ - private fun writeString(tl: TransportLayer, value: String) { + fun writeString(tl: TransportLayer, value: String) { require(value.length <= 2.0.pow(16.0) - 1) writeInteger(tl, value.length.toBigInteger()) val bytes = value.toByteArray() |