CoapEndpoint
constructor(transport: DatagramTransport, scope: CoroutineScope, config: CoapEndpointConfig = CoapEndpointConfig.Default)(source)
An endpoint on transport, for coap peers; it has no connections.
constructor(scope: CoroutineScope, config: CoapEndpointConfig = CoapEndpointConfig.Default, transport: DatagramTransport? = null, connectors: List<Connector> = emptyList(), listeners: List<ConnectionListener> = emptyList())(source)
An endpoint on any combination of transports: transport for coap peers, connectors to open connections to peers of the RFC 8323 schemes they serve, listeners to accept connections. close closes all of them. A request to a peer the endpoint has no transport for fails with CoapException.Reason.TRANSPORT_UNAVAILABLE: a coap peer without transport, or a peer of a scheme no connector serves, unless that peer already has a connection open, as one a listener accepted.