server.addEndpoint(new CoAPEndpoint(new DTLSConnector(new InetSocketAddress(DTLS_PORT)), NetworkConfig.getStandard()));
server.start();
// add special interceptor for message traces
for (Endpoint ep:server.getEndpoints()) {
ep.addInterceptor(new MessageTracer());
}
System.out.println("Secure CoAP server powered by Scandium (Sc) is listening on port "+DTLS_PORT);
}