boaks commented on code in PR #12769:
URL: https://github.com/apache/camel/pull/12769#discussion_r1457549644


##########
components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java:
##########
@@ -68,34 +70,30 @@ public synchronized CoapServer getServer(int port, 
CoAPEndpoint endpoint) throws
         }
         if (server == null) {
             CoapEndpoint.Builder coapBuilder = new CoapEndpoint.Builder();
-            NetworkConfig config = NetworkConfig.createStandardWithoutFile();
+            Configuration config = Configuration.createStandardWithoutFile();
             InetSocketAddress address = new InetSocketAddress(port);
-            coapBuilder.setNetworkConfig(config);
+            coapBuilder.setConfiguration(config);
 
             // Configure TLS and / or TCP
             if (CoAPEndpoint.enableDTLS(endpoint.getUri())) {
                 DTLSConnector connector = 
endpoint.createDTLSConnector(address, false);
                 coapBuilder.setConnector(connector);
             } else if (CoAPEndpoint.enableTCP(endpoint.getUri())) {
-                int tcpThreads = 
config.getInt(NetworkConfig.Keys.TCP_WORKER_THREADS);
-                int tcpIdleTimeout = 
config.getInt(NetworkConfig.Keys.TCP_CONNECTION_IDLE_TIMEOUT);
-
                 TcpServerConnector tcpConnector = null;
                 // TLS + TCP
                 if (endpoint.getUri().getScheme().startsWith("coaps")) {
-                    int tlsHandshakeTimeout = 
config.getInt(NetworkConfig.Keys.TLS_HANDSHAKE_TIMEOUT);
-
                     SSLContext sslContext = 
endpoint.getSslContextParameters().createSSLContext(getCamelContext());
-                    TlsServerConnector.ClientAuthMode clientAuthMode = 
TlsServerConnector.ClientAuthMode.NONE;
                     if (endpoint.isClientAuthenticationRequired()) {
-                        clientAuthMode = 
TlsServerConnector.ClientAuthMode.NEEDED;
+                        config.set(DtlsConfig.DTLS_CLIENT_AUTHENTICATION_MODE, 
CertificateAuthenticationMode.NEEDED);

Review Comment:
   As I wrote above, for TCP/TLS the configuration properties are defined in 
[TcpConfig](https://github.com/eclipse-californium/californium/blob/main/element-connector/src/main/java/org/eclipse/californium/elements/config/TcpConfig.java).
 Using 
[DtlsConfig](https://github.com/eclipse-californium/californium/blob/main/scandium-core/src/main/java/org/eclipse/californium/scandium/config/DtlsConfig.java)
 applies only to DTLS.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to