Package ch.ethz.inf.vs.californium.network.config

Examples of ch.ethz.inf.vs.californium.network.config.NetworkConfig


   
    if (isRunning()) {
      stop();
    }
   
    NetworkConfig networkConfig = NetworkConfig.createStandardWithoutFile();
    if (properties != null) {
      for (Enumeration<String> allKeys = properties.keys(); allKeys.hasMoreElements(); ) {
        String key = allKeys.nextElement();
        networkConfig.set(key, properties.get(key));
      }
    }
   
    // create server instance with CoAP endpoint on configured port
    managedServer = serverFactory.newServer(networkConfig);
   
    // add secure endpoint if configured
    int securePort = networkConfig.getInt(NetworkConfigDefaults.PROPERTY_DEFAULT_COAPS_PORT);
    if ( securePort > 0 ) {
      Endpoint secureEndpoint = endpointFactory.getSecureEndpoint(
          networkConfig, new InetSocketAddress((InetAddress) null, securePort));
      if (secureEndpoint != null) {
        LOGGER.fine("Adding secure endpoint on address " + secureEndpoint.getAddress());
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.californium.network.config.NetworkConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.