ktor-server-core / io.ktor.sessions / SessionStorageMemory / write

write

suspend fun write(id: String, provider: suspend (ByteWriteChannel) -> Unit): Unit

Overrides SessionStorage.write

Writes a session id using a specific provider.

This method calls the provider with a ByteWriteChannel and it is in charge of the channel's lifecycle. provider is in charge of writing session bits to the specified ByteWriteChannel.