summaryrefslogtreecommitdiff
path: root/src/main/kotlin/NinePTranslator.kt
diff options
context:
space:
mode:
authorEdoardo La Greca2025-07-12 19:14:26 +0200
committerEdoardo La Greca2025-07-13 21:22:19 +0200
commit917599228501ae235ffaf01b515c8b06cf8595b0 (patch)
treef7dc4ff08bf44a9b029346aaaec39b23dd35321e /src/main/kotlin/NinePTranslator.kt
parentc916a1c14813fbb96288b0c75efd29e01ee6a0df (diff)
Diffstat (limited to 'src/main/kotlin/NinePTranslator.kt')
-rw-r--r--src/main/kotlin/NinePTranslator.kt14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/kotlin/NinePTranslator.kt b/src/main/kotlin/NinePTranslator.kt
index c976cd9..51b722e 100644
--- a/src/main/kotlin/NinePTranslator.kt
+++ b/src/main/kotlin/NinePTranslator.kt
@@ -1,3 +1,5 @@
+import java.util.Optional
+
/*
TODO:
- add arguments to methods
@@ -12,8 +14,18 @@ TODO:
interface NinePTranslator {
/**
* Negotiate protocol version.
+ *
+ * This must be the first message sent on the 9P connection and no other requests can be issued until a response has
+ * been received.
+ * Tag should be NOTAG ((ushort)~0).
+ *
+ * @param tag Should be NOTAG ((ushort)~0).
+ * @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.
*/
- fun version()
+ fun version(tag: SizedMessageField, msize: SizedMessageField, version: String): String?
/**
* Perform authentication.