diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-28 23:14:12 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-10-28 23:14:12 +0200 |
commit | 8ea8a6ed9d00f8d1da576a7b0715d257534de0fc (patch) | |
tree | 060d515388ccfc1f2cbc461726a6b6335c1fc12f | |
parent | e0a8b92c42ff86fdd6ee4ba9fce4bd2a32059310 (diff) |
WIP: add persistent keepalive to observable tunnel
-rw-r--r-- | ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt index 97aae280..3171a7b7 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -228,6 +228,18 @@ class ObservableTunnel internal constructor( return peer } + override fun onPersistentKeepaliveChange(publicKey: Key, newPersistentKeepalive: Integer?) { + Application.getCoroutineScope().launch { + onPersistentKeepaliveChanged(publicKey, newPersistentKeepalive) + } + } + + private fun onPersistentKeepaliveChanged(publicKey: Key, newPersistentKeepalive: Integer?) { + var peer: PeerDetail = lookupPeer(publicKey) + + peer. + } + override fun onAllowedIpsChange(publicKey: Key, addNetworks: List<InetNetwork>?, removeNetworks: List<InetNetwork>?) { Application.getCoroutineScope().launch { onAllowedIpsChanged(publicKey, addNetworks, removeNetworks) |