NfcTransportMdoc

class NfcTransportMdoc(val role: MdocRole, options: MdocTransportOptions, val connectionMethod: MdocConnectionMethod) : MdocTransport

Constructors

Link copied to clipboard
constructor(role: MdocRole, options: MdocTransportOptions, connectionMethod: MdocConnectionMethod)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class NfcError(val status: Int, message: String) : Exception

Properties

Link copied to clipboard

A MdocConnectionMethod which can be sent to the other peer to connect to.

Link copied to clipboard
open override val role: MdocRole

The role which the transport is for.

Link copied to clipboard
open override val scanningTime: Duration?

The time spent scanning for the other peer.

Link copied to clipboard
open override val state: StateFlow<MdocTransport.State>

The current state of the transport.

Functions

Link copied to clipboard
open suspend override fun advertise()

Starts advertising the connection.

Link copied to clipboard
open suspend override fun close()

Closes the connection.

Link copied to clipboard
open suspend override fun open(eSenderKey: EcPublicKey)

Opens the connection to the other peer.

Link copied to clipboard
open suspend override fun sendMessage(message: ByteArray)

Sends a message to the other peer.

Link copied to clipboard
open suspend override fun waitForMessage(): ByteArray

Waits for the other peer to send a message.