-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor corellium client to functional style
Add some diagrams
- Loading branch information
Showing
26 changed files
with
693 additions
and
463 deletions.
There are no files selected for viewing
153 changes: 0 additions & 153 deletions
153
corellium/client/src/main/kotlin/flank/corellium/client/Agent.kt
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
corellium/client/src/main/kotlin/flank/corellium/client/Console.kt
This file was deleted.
Oops, something went wrong.
168 changes: 0 additions & 168 deletions
168
corellium/client/src/main/kotlin/flank/corellium/client/Corellium.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
corellium/client/src/main/kotlin/flank/corellium/client/VPN.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
corellium/client/src/main/kotlin/flank/corellium/client/agent/Agent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package flank.corellium.client.agent | ||
|
||
import flank.corellium.client.data.CommandResult | ||
import io.ktor.client.features.websocket.ClientWebSocketSession | ||
import kotlinx.serialization.json.Json | ||
import java.util.concurrent.ConcurrentHashMap | ||
import java.util.concurrent.atomic.AtomicInteger | ||
|
||
class Agent internal constructor( | ||
internal val session: ClientWebSocketSession, | ||
internal val tasks: TasksMap = TasksMap(), | ||
internal val counter: AtomicInteger = AtomicInteger(1), | ||
internal val format: Json = Json {}, | ||
) | ||
|
||
typealias TasksMap = ConcurrentHashMap<Int, (CommandResult) -> Unit> |
Oops, something went wrong.