Skip to content

MongoWireClient

Constructors

MongoWireClient

@LowLevelApi
suspend fun MongoWireClient(
    hostName: String, 
    port: Int, 
    factory: BsonFactory = BsonFactory(), 
    coroutineContext: CoroutineContext
): MongoWireClient

Types

Companion

object Companion

Functions

close

abstract suspend fun close()

Closes the client.

If there are in-flight requests, they will be allowed to complete. However, no new requests will be accepted.

send

abstract suspend fun send(message: Message): ReceiveChannel<Message>

sendSingle

abstract suspend fun sendSingle(message: Message): Message

Sends a message that expects a single response.