Ejemplo n.º 1
0
 /**
  * This updates ALL the session options (not just the bw) and tells the router
  *
  * @param limit KBps
  */
 public void setMaxUpBW(int limit) {
   _maxUpBW = limit;
   _opts.put(PROP_MAX_BW, Integer.toString(limit * (1024 * 6 / 5))); // add a little for overhead
   _configured = true;
   if (_manager != null) {
     I2PSession sess = _manager.getSession();
     if (sess != null) {
       Properties newProps = new Properties();
       newProps.putAll(_opts);
       sess.updateOptions(newProps);
     }
   }
 }