summaryrefslogtreecommitdiff
path: root/src/main/kotlin/Connection.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/Connection.kt')
-rw-r--r--src/main/kotlin/Connection.kt17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/kotlin/Connection.kt b/src/main/kotlin/Connection.kt
index a7de8cc..1cef2d3 100644
--- a/src/main/kotlin/Connection.kt
+++ b/src/main/kotlin/Connection.kt
@@ -110,8 +110,21 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
TODO("Not yet implemented")
}
- override fun flush() {
- TODO("Not yet implemented")
+ override fun flush(oldtag: UShort): String? {
+ val omsg = OutMessage(NinePMessageType.TFLUSH, this.tagGen.generate(), listOf("oldtag"),
+ mapOf(
+ "oldtag" to BigInteger(oldtag.toString())
+ ),
+ emptyMap(),
+ emptyMap(),
+ this.maxSize
+ )
+ omsg.write(this.tl)
+ val checkErr = checkedInMessage(omsg.tag)
+ if (checkErr.first != null) {
+ return checkErr.first
+ }
+ return null
}
override fun attach(fid: UInt, afid: UInt, uname: String, aname: String): String? {