DataTransportHttp

HTTP data transport.

TODO: Maybe make it possible for the application to check the TLS root certificate via DataTransportOptions

Constructors

Link copied to clipboard
constructor(context: Context, role: DataTransport.Role, connectionMethod: MdocConnectionMethodHttp?, options: DataTransportOptions)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A MdocConnectionMethod instance that can be used to connect to this transport.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var port: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Closes the connection with the remote mdoc or mdoc reader.

Link copied to clipboard
open override fun connect()

Starts connecting to the remote mdoc or mdoc reader.

Link copied to clipboard

Returns the next message received, if any.

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

Sends data to the remote mdoc or mdoc reader.

Link copied to clipboard

Sends a transport-specific termination message.

Link copied to clipboard
open override fun setEDeviceKeyBytes(encodedEDeviceKeyBytes: ByteArray)

Sets the bytes of EDeviceKeyBytes.

Link copied to clipboard
fun setListener(listener: DataTransport.Listener?, executor: Executor?)

Set the listener to be used for notification.

Link copied to clipboard
fun setupWritingThread(isListener: Boolean)

Whether the transport supports a transport-specific termination message.