diff options
author | Edoardo La Greca | 2025-08-07 19:54:25 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-08-07 19:54:25 +0200 |
commit | 62db47bb6a6b2dbdff05d03a57c24cdf9e77d16c (patch) | |
tree | 141d7b704396f6b44ae790495f9d0c56be858f56 /src/main/kotlin/ProtocolTranslator.kt | |
parent | 60a9b89d01babe1d261d42a698ea906f4b293b59 (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.kt | 7 |
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. |