From 391de1ffbd961f7ae6bc4e489975ed0a645e0089 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 1 Aug 2025 16:53:52 +0200 Subject: fix types --- src/main/kotlin/NetworkPacketTransporter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/kotlin/NetworkPacketTransporter.kt') diff --git a/src/main/kotlin/NetworkPacketTransporter.kt b/src/main/kotlin/NetworkPacketTransporter.kt index 4b11967..e12a6ac 100644 --- a/src/main/kotlin/NetworkPacketTransporter.kt +++ b/src/main/kotlin/NetworkPacketTransporter.kt @@ -10,7 +10,7 @@ import java.io.Closeable * if the remote address is a domain name, but it cannot be resolved. * * Depending on the specific given implementation, the constructor of this class might throw other exceptions (e.g. the - * [Socket] constructor from [java.net] in [NetworkPacketTransporterJavaNet]). + * [java.net.Socket] constructor in [NetworkPacketTransporterJavaNet]). */ abstract class NetworkPacketTransporter : Closeable { val address: String @@ -48,8 +48,8 @@ abstract class NetworkPacketTransporter : Closeable { * * @throws java.io.IOException if the message could not be correctly transmitted. */ - abstract fun transmit(payload: List) + abstract fun transmit(payload: Array) /** * Receive a payload until a byte occurs, which marks the end of the message. The byte is discarded after being read * and is not returned. @@ -64,11 +64,11 @@ abstract class NetworkPacketTransporter : Closeable { abstract fun receiveUntil(untilByte: Byte): List /** - * Receive a payload with fixed length. + * Receive a payload with fixed length. If zero, nothing is read. * * @param length The length of the message in bytes. - * + * @return the received payload. * @throws java.io.IOException if the message could not be correctly received. */ - abstract fun receiveFixed(length: ULong): List + abstract fun receive(length: ULong): Array } \ No newline at end of file -- cgit v1.2.3