Commit Graph

1930 Commits

Author SHA1 Message Date
e73eb55d75 don't create two contexts just for this I2PTunnel (one implicit from the static new Log(I2PTunnel.class) and one explicit) 2004-04-24 12:51:15 +00:00
393b1d7674 big ol' update to strip out the singletons, replacing them with
a rooted app context.  The core itself has its own I2PAppContext
(see its javadoc for, uh, docs), and the router extends that to
expose the router's singletons.  The main point of this is to
make it so that we can run multiple routers in the same JVM, even
to allow different apps in the same JVM to switch singleton
implementations (e.g. run some routers with one set of profile
calculators, and other routers with a different one).
There is still some work to be done regarding the actual boot up
of multiple routers in a JVM, as well as their configuration,
though the plan is to have the RouterContext override the
I2PAppContext's getProperty/getPropertyNames methods to read from
a config file (seperate ones per context) instead of using the
System.getProperty that the base I2PAppContext uses.
Once the multi-router is working, i'll shim in a VMCommSystem
that doesn't depend upon sockets or threads to read/write (and
that uses configurable message send delays / disconnects / etc,
perhaps using data from the routerContext.getProperty to drive it).
I could hold off until the sim is all working, but there's a
truckload of changes in here and I hate dealing with conflicts ;)
Everything works - I've been running 'er for a while and kicked
the tires a bit, but if you see something amiss, please let me
know.
2004-04-24 11:54:35 +00:00
c29a6b95ae Increased logging priority for connection timeouts
(human)
2004-04-23 14:18:48 +00:00
4fe7105e2f Implemented timeout handling to I2PTunnelServer 2004-04-21 17:58:26 +00:00
d7c3a53f2d Initial implementation of read() timeout on I2PSocket. Let's see whether it
could solve duck's problems with dangling threads...
(human)
2004-04-21 17:56:16 +00:00
90350786e6 s/InterruptedException/InterruptedIOException/
(human)
2004-04-20 15:43:04 +00:00
8038e1ee7d I2PSocketManager.connect() should have thrown InterruptedIOException, and *not*
InterruptedException (oops!)
(human)
2004-04-20 15:38:55 +00:00
65f1a5fed6 write out the public dest every time we connect, /including/ the first time. (thanks duck) 2004-04-20 13:30:09 +00:00
c03cb1de5e revised GUI fetch/build/dist process - at the top level, run
'ant prepGUI' to fetch and prepare the jfreechart code
'ant buildGUI' to build the jars necessary
'ant distGUI' to build a gui.zip that contains the jars and a
license notice related to the LGPL and APL software linked
within it.
("installing" the GUI == unzip gui.zip into the I2P install dir)
2004-04-20 09:13:07 +00:00
7e1b49a742 fixed up some of the cleanup code to handle out of order responses
minor refactoring, formatting
2004-04-20 07:42:53 +00:00
d26c56e467 verbose4life 2004-04-20 07:39:47 +00:00
203d0e870a allow the user to override the I2CP options (exposed on the command line, ala
SAMBridge [[listenHost ]listenPort[ name=val]*]
where listenHost defaults to localhost, listenPort defaults to 7656, and name=val
can be the I2CP options to override (e.g. i2cp.tcp.host=localhost i2cp.tcp.port=4001)
2004-04-20 07:26:34 +00:00
ebc3e05f23 * Made the SAM bridge aware of the new exceptions thrown by
I2PSocketManager.connect(), with better error reporting to SAM clients;
* made SAMStreamSession destroy the associated I2PSocketManager when being
  closed.
(human)
2004-04-19 21:52:52 +00:00
674ad899f9 Made HTTPTunnel aware of the new exceptions thrown by
I2PSocketManager.connect()
(human)
2004-04-19 21:48:14 +00:00
d945eb6fcf Made all the ministreaming-based apps aware of the new exceptions thrown by
I2PSocketManager.connect()
(human)
2004-04-19 21:47:06 +00:00
fb170e3c42 * Made I2PSocketManager.connect() throw several kinds of exceptions, for
better error reporting;
* Added an I2PSocketManager.destroySocketManager() method, that closes all
  the managed sockets and destroys the associated I2PSession.
(human)
2004-04-19 21:45:04 +00:00
5e78a41b75 remove unnecessary scrolls and packs 2004-04-18 22:53:07 +00:00
3295c18829 * Added DATAGRAM supprt;
* refactoring of SAMRawSession.java, to make it derive from
  SAMMessageSession.java (parent class for SAMDatagramSession.java, too);
* removed unuseful cruft;
* some fixes;
* M-x untabify.
(human)
2004-04-17 23:19:20 +00:00
8206a26267 sample harvester.config (defining what stats we want to harvest from the netDb) 2004-04-17 03:33:19 +00:00
8c7b91bd79 load what stats we want to monitor from a config file (harvester.config) 2004-04-17 03:32:51 +00:00
061460f978 insane error handling 2004-04-17 00:43:03 +00:00
58c145ba08 Oops! Added missing file...
(human)
2004-04-16 03:44:35 +00:00
c0bb3da22f * Added support for SESSION CREATE STYLE=STREAM DIRECTION={CREATE|RECEIVE|BOTH}
* M-x untabify
(human)
2004-04-16 03:42:05 +00:00
031338d84d First step for the "connection refused" concept: incoming connections
won't be accepted until the server app actually requires an I2PServerSocket
from the I2PSocketManager.
It allows both to add a little bit of functionality, and to fix a nasty bug: it
was possible to hang an app that connects through the I2PSocketManager but
actually doesn't accept() connections (if 2 connection requests were sent
to the app, the I2PSocketManager got stuck waiting forever on
I2PServerSocketImpl.getNewSocket()).
2004-04-16 03:31:13 +00:00
2a619f3fba Slightly updated specs
(human)
2004-04-16 03:22:37 +00:00
1c145cbc09 handle corruption / race during update of the peer's routerInfo data 2004-04-16 03:21:20 +00:00
8fbd7acf2a initial impl (public domain, yadda yadda yadda) 2004-04-16 02:16:55 +00:00
7b824e6178 kill long lines
[mihi]
2004-04-14 23:27:50 +00:00
24c69a26ea untabify
[mihi]
2004-04-14 23:26:59 +00:00
7b03c95cfd * Added STREAMing support;
* added NAMING LOOKUP NAME=ME support;
* various cleanups & fixes;
* what else?
(human)
2004-04-14 16:59:47 +00:00
d2b09ecfda * Fixed race that (maybe) caused the problems reported by aum on
<http://dev.i2p.net/pipermail/i2p/2004-April/000214.html>;
* slightly revised locking;
* made accept() throw a ConnectException when the I2PServerSocket is closed.
(human)
2004-04-14 15:28:02 +00:00
aum
4cdd42f391 Fixed build.xml to detect os, and launch 'jythonc' or 'jythonc.bat'
according to whether we're running on *nix or windoze. build.xml
should now work on your platform, as long as you have jython installed
and jython is on your execution path.

Got SAM STREAMs working - test code added to i2psamclient.py
as function demoSTREAM()
2004-04-13 17:40:07 +00:00
4d0b3b287f SAM bridge integration in the I2P build & packaging system
(human)
2004-04-13 04:41:14 +00:00
0d7f784773 Pure-java implementation of the SAM bridge. It actually supports the
HELLO, DEST and NAMING commands, plus SESSIONs with STYLE=RAW. It works with
aum's client-side Python library (modulo a small change in the HELLO command,
required to allow protocol versioning, not yet implemented in the client lib).
(human)
2004-04-13 04:38:52 +00:00
33782859b8 the heartbeat engine and gui are good 'nuff for now
(while i want to spend another few days on it, there
are more pressing things and this will meet my needs
for testnet).  the engine works as before, and the
gui now actually plots out and follows the chart over time.
The gui does have a lot of things left to be done before
it can be adopted by joe sixpack -
 * load/store the URLs being monitored so you don't
   have to reenter them on each startup
 * clear out the x axis on refetch (now it just keeps
   growing, which is good and bad)
 * adjustable refresh rate
 * implement snapshots (saving all the current state
   files to a dir, and allowing that dir to be loaded
   all at once)
 * beautification (override the colors, etc)
the net.i2p.heartbeat.** code is all public domain, BUT
net.i2p.heartbeat.gui.JFreeChart* classes depend on the
LGPL'ed jfreechart code, which in turn depends on apache
licensed code (log4j).  for the time being, this code
doesn't include the jfreechart code (and dependencies),
but the ant task in apps/heartbeat/java 'fetchJfreechart'
downloads it and places it under apps/heartbeat/java/lib,
after which you can build the GUI by running the ant task
'buildGUI' (buildGUI / etc are NOT in the standard build
process).
once we figure out all the details to comply with the
requirements of log4j's license we'll do so.  but for now,
the above works.
2004-04-13 03:24:04 +00:00
aum
c889a83707 More update ant tidy-up 2004-04-12 08:53:26 +00:00
aum
6a55af1950 Fixed paths 2004-04-12 08:43:32 +00:00
aum
a85cf2c2af Makefile and build.bat removed since we've switched to ant
README moved up to parent
2004-04-12 08:41:43 +00:00
aum
4c0e3f92d3 Created build.xml for SAM
Moved README out of build dir
2004-04-12 08:32:32 +00:00
e3354a805e javadoc, imports
(shendaras)
2004-04-12 08:14:07 +00:00
aum
d3ad111b85 change - now goes to root build dir and does 'ant build' to ensure
the required jars are present
2004-04-12 06:41:24 +00:00
aum
de740b1d9d started adding STREAM support 2004-04-12 05:46:05 +00:00
7c155545ae partial impl of the gui, still a few things left to do:
- implement some validation on the state files loaded
- reenable delete and updates to refresh
- integrate the real chart code (currently just plain text instead of the graphs)
- gui updates
i wont spend more than another day on this during the testnet, but i want to get it plotting before continuing.
2004-04-12 02:44:18 +00:00
aum
a7597b2a6d Tested build process on windows.
Updated README, and fixed build.bat, so windows build
of i2psam.jar works.
2004-04-11 10:31:41 +00:00
aum
22916c1904 Corrected Makefile:
- removed relative path for jython.jar, replaced with a def
   which developer must edit

Added README
 - overviews the i2psam.jar building process

Added build.bat
 - an attempt at a build script which might work on Windows, for people
   who don't have 'make' installed
2004-04-11 07:21:28 +00:00
fbddb24728 license incompatible with i2p license policy - section 2 requires application
developers to use the software in a particular way (to have the software display
"Copyright \xa91996-1999 Corporation for National Research Initiatives; All Rights Reserved")
section 3 has a similar problem.

this violates the rule #2 of the i2p license policy -
All software bundled in the I2P distributions will allow
 2) use with no restrictions on how, when, where, why, or by whom is running it

in addition, using jython does not seem wise for some situations, as the license is
not GPL compatible (aka cannot be used with the GPL'ed SAM code)

sorry for the confusion earlier aum, I had mistakenly seen a COPYING file and
assumed it was Yet Another copy of the GPL.

http://lists.debian.org/debian-python/2001/debian-python-200107/msg00001.html as
well.
2004-04-10 12:56:02 +00:00
51c49d7c1b format (shendaras) 2004-04-10 11:50:11 +00:00
17a1b11f66 beginning of format, updated imports. (shendaras) 2004-04-10 11:45:02 +00:00
8a8e68146f beginning of format, updated imports. (shendaras) 2004-04-10 11:39:00 +00:00
dbe5dea525 120 code, 160 comments (shendaras) 2004-04-10 11:01:42 +00:00