diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index 3161f68e..2f87fcea 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -284,8 +284,7 @@ open class Client(config: Configuration = Configuration // only change LOCALHOST -> IPC if the media driver is ALREADY running LOCALLY! var isUsingIPC = false - val canUseIPC = config.enableIpc - val autoChangeToIpc = config.enableIpcForLoopback && + val autoChangeToIpc = config.enableIpc && (remoteAddress == null || remoteAddress.isLoopbackAddress) && aeronDriver.isRunning() diff --git a/src/dorkbox/network/Configuration.kt b/src/dorkbox/network/Configuration.kt index 057a250a..ea3f01d2 100644 --- a/src/dorkbox/network/Configuration.kt +++ b/src/dorkbox/network/Configuration.kt @@ -175,7 +175,8 @@ open class Configuration { } /** - * Enables the ability use IPC (Inter Process Communication). + * Enables the ability use IPC (Inter Process Communication). If a "loopback" is specified, and this is 'true', then + * IPC will be used instead - if possible. IPC is about 4x faster than UDP in loopback situations. * * Aeron must be running in the same location for the client/server in order for this to work */ @@ -185,17 +186,6 @@ open class Configuration { field = value } - /** - * Permit loopback connections to use IPC instead of UDP for communicating, if possible. IPC is about 4x faster than UDP in loopback situations. - * - * This configuration only affects the client - */ - var enableIpcForLoopback: Boolean = true - set(value) { - require(context == null) { errorMessage } - field = value - } - /** * When connecting to a remote client/server, should connections be allowed if the remote machine signature has changed? *