MobWebrtc.KeyCert (mob_webrtc v0.1.0)

Copy Markdown View Source

One DTLS key and certificate for every peer the app opens.

ex_dtls only generates RSA-2048 keys, which took 150–1,100 ms each on the spike's simulator and emulator, and ex_webrtc generates one per PeerConnection unless it's given a key_cert. This process makes one at application start, off the call path. A get/1 that arrives while it's still generating waits for it.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

key_cert()

@type key_cert() :: {pkey :: binary(), cert :: binary()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(timeout \\ 5000)

@spec get(timeout()) :: {:ok, key_cert()} | {:error, term()}

start_link(arg)

@spec start_link(term()) :: GenServer.on_start()

status()

@spec status() :: :ready | {:error, term()}