summaryrefslogtreecommitdiff
path: root/src/main/kotlin/TransportLayer.kt
diff options
context:
space:
mode:
authorEdoardo La Greca2025-08-05 21:23:50 +0200
committerEdoardo La Greca2025-08-05 21:23:50 +0200
commitfc7c0ddc5b939bf5d2b44a36ab14508d36fee3ba (patch)
tree266d45dbc37e9a58c082430c989314033137a823 /src/main/kotlin/TransportLayer.kt
parent445cbf2eacd4c59dfb6662fff03723e18b40639a (diff)
add receiver method to TransportLayer
Diffstat (limited to 'src/main/kotlin/TransportLayer.kt')
-rw-r--r--src/main/kotlin/TransportLayer.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/kotlin/TransportLayer.kt b/src/main/kotlin/TransportLayer.kt
index d4a9b12..8778592 100644
--- a/src/main/kotlin/TransportLayer.kt
+++ b/src/main/kotlin/TransportLayer.kt
@@ -47,4 +47,11 @@ interface TransportLayer : Closeable {
* @throws java.io.IOException if the message could not be correctly received.
*/
fun receive(length: ULong): Array<UByte>
+
+ /**
+ * Gives the caller a "receiver" (i.e. an instance of Iterable) from which raw data of any length can be read.
+ *
+ * @return The receiver.
+ */
+ fun receiver(): Iterable<UByte>
} \ No newline at end of file