Skip to content

Commit

Permalink
Refactor corellium client to functional style
Browse files Browse the repository at this point in the history
Add some diagrams
  • Loading branch information
jan-goral authored and mergify-bot committed Apr 28, 2021
1 parent 0265a34 commit 9f7c894
Show file tree
Hide file tree
Showing 26 changed files with 693 additions and 463 deletions.
153 changes: 0 additions & 153 deletions corellium/client/src/main/kotlin/flank/corellium/client/Agent.kt

This file was deleted.

52 changes: 0 additions & 52 deletions corellium/client/src/main/kotlin/flank/corellium/client/Console.kt

This file was deleted.

168 changes: 0 additions & 168 deletions corellium/client/src/main/kotlin/flank/corellium/client/Corellium.kt

This file was deleted.

This file was deleted.

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>
Loading

0 comments on commit 9f7c894

Please sign in to comment.