X509.Test.Server (X509 v0.9.2)

View Source

Simple TLS server for hosting X509.Test.Suite scenarios.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the TCP port number on which the specified X509.Test.Server instance is listening.

Starts a test server for the given test suite.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_port(pid)

@spec get_port(pid()) :: :inet.port_number()

Returns the TCP port number on which the specified X509.Test.Server instance is listening.

log_opts()

start_link(arg)

@spec start_link({X509.Test.Suite.t(), Keyword.t()}) :: GenServer.on_start()

Starts a test server for the given test suite.

Options:

  • :port - the TCP port to listen on; defaults to 0, meaning an ephemeral port is selected by the operating system, which may be retrieved using get_port/1
  • :response - the data to send back to clients when a successful connection is established (default: "OK")