2004-07-21 07:42:29 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html lang="en"><head><title>User's Guide:i2p.router - Wikipedia</title>
|
|
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
|
|
<meta name="robots" content="index,follow">
|
|
|
|
<link rel="shortcut icon" href="/favicon.ico">
|
|
|
|
<style type='text/css'><!--
|
|
|
|
/*/*/
|
|
|
|
a.new, #quickbar a.new { color: #CC2200; }
|
|
|
|
#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }
|
|
|
|
#article { margin-left: 152px; margin-right: 4px; }
|
|
|
|
/* */
|
|
|
|
//--></style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body bgcolor='#FFFFFF' onload=''>
|
|
|
|
<h1 class='pagetitle'>User's Guide:i2p.router</h1><p class='subtitle'>From Python-I2P.
|
|
|
|
|
|
|
|
|
|
|
|
<div class='bodytext'>
|
2004-07-21 11:56:36 +00:00
|
|
|
Module <code >i2p.router</code > allows Python programs to control the I2P router.
|
2004-07-21 07:42:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<h2><a name="Functions"> Functions </a></h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<strong>check</strong>(dir=None)
|
|
|
|
<ul ><pre>
|
|
|
|
Checks whether a locally installed router is running. Does
|
|
|
|
nothing if successful, otherwise raises i2p.RouterError.
|
|
|
|
|
|
|
|
An I2P installation is located by using find(dir).
|
|
|
|
The router.config file is parsed for 'router.adminPort'.
|
|
|
|
This port is queried to determine whether the router is
|
|
|
|
running.
|
|
|
|
</pre>
|
|
|
|
</ul >
|
|
|
|
<strong>find</strong>(dir=None)
|
|
|
|
<ul ><pre>
|
|
|
|
|
|
|
|
Find the absolute path to a locally installed I2P router.
|
|
|
|
|
|
|
|
An I2P installation is located by looking in the
|
2004-08-02 13:50:21 +00:00
|
|
|
dir argument given to the function, then in the environment
|
|
|
|
I2P, then in PATH. It looks for startRouter.sh or
|
2004-07-21 07:42:29 +00:00
|
|
|
startRouter.bat. Raises ValueError if an I2P installation
|
|
|
|
could not be located.
|
|
|
|
</pre>
|
|
|
|
</ul >
|
|
|
|
<strong>start</strong>(dir=None, hidden=False)
|
|
|
|
<ul ><pre>
|
|
|
|
Start a locally installed I2P router. Does nothing if
|
|
|
|
the router has already been started.
|
|
|
|
|
|
|
|
An I2P installation is located by using find(dir).
|
|
|
|
|
|
|
|
If hidden is True, do not show a terminal for the router.
|
|
|
|
</pre>
|
|
|
|
</ul >
|
|
|
|
<strong>stop</strong>(dir=None, force=False)
|
|
|
|
<ul ><pre>
|
|
|
|
Stop a locally installed I2P router, if it was started by
|
|
|
|
the current Python program. If force is True, stop the
|
|
|
|
router even if it was started by another process. Do nothing
|
|
|
|
if force is False and the router was started by another program.
|
|
|
|
|
|
|
|
The file 'router.config' is located using the same search
|
|
|
|
process used for find(dir). It is parsed for
|
|
|
|
'router.shutdownPassword' and 'router.adminPort'. The
|
|
|
|
router is shut down through the admin port.
|
|
|
|
|
|
|
|
Raises i2p.RouterError if the I2P router is running but cannot
|
|
|
|
be stopped. You must uncomment the
|
|
|
|
'router.shutdownPassword' line for this command to work.
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
</ul >
|
|
|
|
|
|
|
|
<p>
|
|
|
|
</div>
|
|
|
|
<p><em>
|
|
|
|
</em><!-- Time since request: 0.77 secs. -->
|
|
|
|
</body></html>
|