Enable Explicit Api (#21)

This commit is contained in:
Alexander Sysoev 2024-12-16 20:59:53 +01:00 • committed by GitHub
commit 852a4a3d5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}
}
}