public static int[] getBWLimits(String host, int port) { int[] rv = null; try { I2PClient client = new I2PSimpleClient(); Properties opts = new Properties(); opts.put(I2PClient.PROP_TCP_HOST, host); opts.put(I2PClient.PROP_TCP_PORT, "" + port); I2PSession session = client.createSession(null, opts); session.connect(); rv = session.bandwidthLimits(); session.destroySession(); } catch (I2PSessionException ise) {} return rv; }
/** * Create a new session (though do not connect it yet) * */ public I2PSession createSession(InputStream destKeyStream, Properties options) throws I2PSessionException { return createSession(I2PAppContext.getGlobalContext(), options); }
Hash key = Hash.create(h); Destination rv = null; I2PClient client = new I2PSimpleClient(); Properties opts = new Properties(); if (!ctx.isRouterContext()) {
I2PClient client = new I2PSimpleClient(); Properties opts = new Properties(); if (i2cpHost != null)