Enable Explicit Api (#21)
This commit is contained in:
parent
a63ee76ff6
commit
852a4a3d5e
1 changed files with 291 additions and 272 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import org.jetbrains.kotlinx.mcp.JSONRPCMessage
|
||||
import org.jetbrains.kotlinx.mcp.shared.Transport
|
||||
|
||||
|
|
@ -7,8 +5,6 @@ import org.jetbrains.kotlinx.mcp.shared.Transport
|
|||
* In-memory transport for creating clients and servers that talk to each other within the same process.
|
||||
*/
|
||||
class InMemoryTransport : Transport {
|
||||
private val scope = CoroutineScope(SupervisorJob())
|
||||
|
||||
private var otherTransport: InMemoryTransport? = null
|
||||
private val messageQueue: MutableList<JSONRPCMessage> = mutableListOf()
|
||||
|
||||
|
|
@ -55,4 +51,4 @@ class InMemoryTransport : Transport {
|
|||
other.messageQueue.add(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue