jvmMain.com.ditchoom.mqtt3.persistence.DefaultPersistence.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mqtt-4-models Show documentation
Show all versions of mqtt-4-models Show documentation
Defines the MQTT 3 and 4 control packets
package com.ditchoom.mqtt3.persistence
import com.ditchoom.mqtt.Persistence
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.newSingleThreadContext
actual suspend fun newDefaultPersistence(androidContext: Any?, name: String, inMemory: Boolean): Persistence =
SqlDatabasePersistence(sqlDriver(androidContext, name, inMemory)!!)
actual fun defaultDispatcher(nThreads: Int, name: String): CoroutineDispatcher = newSingleThreadContext("Mqtt-SQL")
© 2015 - 2025 Weber Informatics LLC | Privacy Policy