summaryrefslogtreecommitdiff
path: root/src/main/kotlin/ProtocolTranslator.kt
diff options
context:
space:
mode:
authorEdoardo La Greca2025-08-07 19:54:25 +0200
committerEdoardo La Greca2025-08-07 19:54:25 +0200
commit62db47bb6a6b2dbdff05d03a57c24cdf9e77d16c (patch)
tree141d7b704396f6b44ae790495f9d0c56be858f56 /src/main/kotlin/ProtocolTranslator.kt
parent60a9b89d01babe1d261d42a698ea906f4b293b59 (diff)
change version to use exceptions instead of error strings
Diffstat (limited to 'src/main/kotlin/ProtocolTranslator.kt')
-rw-r--r--src/main/kotlin/ProtocolTranslator.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/kotlin/ProtocolTranslator.kt b/src/main/kotlin/ProtocolTranslator.kt
index eaa415f..f7b114f 100644
--- a/src/main/kotlin/ProtocolTranslator.kt
+++ b/src/main/kotlin/ProtocolTranslator.kt
@@ -27,9 +27,12 @@ interface ProtocolTranslator {
* @param msize The maximum length, in bytes, that the client will ever generate or expect to receive in a single
* 9P message.
* @param version Should be "9P2000", which is the only defined value.
- * @return a possible error.
+ * @throws InvalidMessageException if the received message is invalid.
+ * @throws RErrorException if the received message is an R-error message.
+ * @throws MsizeValueTooBigException if the received `msize` value is bigger than what the client requested.
+ * @throws UnknownVersionException if the version negotiation failed.
*/
- fun version(msize: UInt, version: String): String?
+ fun version(msize: UInt, version: String)
/**
* Perform authentication.