Package-level declarations
Types
A byte stream: TCP or TLS (RFC 8323 coap+tcp, coaps+tcp). The reliable messaging layer does the Len/TKL framing on top. One messaging-layer instance per connection, so tokens are scoped to it.
The CoAP URI schemes and what each needs from the transport layer.
A connection for CoAP over a reliable transport (RFC 8323): a ByteStreamConnection (TCP, TLS) or a MessageConnection (WebSocket). The CoAP endpoint runs one reliable messaging layer per connection, so tokens and signaling state (CSM, Ping, Release, Abort) are scoped to it (RFC 8323 §3.3, §4.3).
Accepts connections for CoAP over reliable transports: a TCP server socket, or a WebSocket endpoint at /.well-known/coap that requires the subprotocol coap (RFC 8323 §4.1).
Opens connections for CoAP over reliable transports (RFC 8323 §8): coap+tcp and coaps+tcp to an Endpoint.Tcp, coap+ws and coaps+ws to an Endpoint.WebSocket. A CoAP endpoint calls it when a request needs a connection to a peer it has none to, and closes it when the endpoint closes.
What a DatagramTransport hands to the messaging layer.
Adds DTLS to a datagram transport, which is what coaps needs (RFC 7252 §9.1). kcoap-dtls will implement it; until then no implementation exists, coaps is unavailable, and the interface is ExperimentalKcoapApi because its shape may change with that first implementation.
Datagrams in, datagrams out: UDP, multicast, non-IP links, and DTLS through DatagramSecurity. Used by the RFC 7252 messaging layer (CON/NON/ACK/RST, deduplication, retransmission).
The one textual form of an IP address, which Endpoint.Udp and Endpoint.Tcp keep their host in, so that one address is one endpoint: dotted decimal for IPv4, RFC 5952 canonical text for IPv6 (lower case, no leading zeros, the longest run of two or more zero groups compressed to ::). IPv4-mapped IPv6 addresses are written as IPv4, as a dual-stack socket reports such peers.
A message stream: WebSocket (RFC 8323 coap+ws, coaps+ws), one CoAP message per binary frame. TLS for coaps+ws is always the WebSocket client's own (wss://), also in browsers.
Who the peer is according to channel security (DTLS or TLS), already authenticated by that layer. OSCORE and EDHOC identities are separate; the application can authorize on either or both.
Channel-security modes of RFC 7252 §9. RFC 8323 §9.1 uses the same three secured modes for TLS.
Thrown by DatagramTransport.send when the target Endpoint.Secure has ended.