From c916a1c14813fbb96288b0c75efd29e01ee6a0df Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 20 Jun 2025 18:01:47 +0200 Subject: add clarification about exceptions thrown in constructors of NetworkPacketTransporter implementors --- src/main/kotlin/NetworkPacketTransporter.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/NetworkPacketTransporter.kt b/src/main/kotlin/NetworkPacketTransporter.kt index 86f651a..4b11967 100644 --- a/src/main/kotlin/NetworkPacketTransporter.kt +++ b/src/main/kotlin/NetworkPacketTransporter.kt @@ -8,6 +8,9 @@ import java.io.Closeable * The address of the remote endpoint can be an IP address (v4 or v6) or a domain name, in which case it is resolved to * an IP address right before initializing the connection. Every constructor should throw an [UnresolvableHostException] * 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]). */ abstract class NetworkPacketTransporter : Closeable { val address: String -- cgit v1.2.3