Skip to content

Commit

Permalink
make default port explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
scrayos committed Apr 24, 2024
1 parent 2793b3f commit 7632a7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/net/scrayos/xenos/client/GrpcXenosClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GrpcXenosClient(
/** The host of the external gRPC interface of Xenos, that will be used to establish the connection. */
host: String,
/** The port of the external gRPC interface of Xenos, that will be used to establish the connection. */
port: Int = 50051,
port: Int = DEFAULT_XENOS_PORT,
) : XenosClient {

/** The [channel][ManagedChannel], that will be used for the network communication with the external interface. */
Expand Down Expand Up @@ -168,6 +168,9 @@ class GrpcXenosClient(
/** The logger that will be utilized to perform any logging for the methods of this class. */
private val logger = LoggerFactory.getLogger(GrpcXenosClient::class.java)

/** The default port, that will be used to communicate with the gRPC server of Xenos. */
private const val DEFAULT_XENOS_PORT: Int = 50051

/** The [duration][Duration], that will be waited at maximum for the successful shutdown of the channel. */
private val SHUTDOWN_GRACE_PERIOD = Duration.ofSeconds(5)
}
Expand Down

0 comments on commit 7632a7f

Please sign in to comment.