diff --git a/apps/sam/python/doc/guide/wiki/i2p.BaseHTTPServer.txt b/apps/sam/python/doc/guide/wiki/i2p.BaseHTTPServer.txt new file mode 100644 index 000000000..4a568a631 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.BaseHTTPServer.txt @@ -0,0 +1,49 @@ +Title: User's Guide:i2p.BaseHTTPServer + +Emulates Python BaseHTTPServer module using I2P sockets. + +== Overview == + +The Python module is described at http://www.python.org/doc/current/lib/module-BaseHTTPServer.html + +To get a server going, use: + + + +Consult the documentation for function test() to change basic server settings, such as the session name. + +A fully customizable example: + + + +== Classes == + +class '''BaseHTTPRequestHandler''' + +class '''HTTPServer''' + + +== Functions == + +'''test'''(HandlerClass=BaseHTTPRequestHandler, ServerClass=HTTPServer, protocol='HTTP/1.0', session='mytestxxx.i2p') + diff --git a/apps/sam/python/doc/guide/wiki/i2p.CGIHTTPServer.txt b/apps/sam/python/doc/guide/wiki/i2p.CGIHTTPServer.txt new file mode 100644 index 000000000..9457e0298 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.CGIHTTPServer.txt @@ -0,0 +1,48 @@ +Title: User's Guide:i2p.CGIHTTPServer + +Module i2p.CGIHTTPServer emulates the Python CGIHTTPServer module using I2P sockets. + +== Overview == + +The Python module is described at http://www.python.org/doc/current/lib/module-CGIHTTPServer.html + +To get a server going, use: + + + +Consult the documentation for function test() to change basic server settings, such as the session name. + +A fully customizable example: + + + +== Classes == + +class '''CGIHTTPRequestHandler''' + + +== Functions == + +'''test'''(HandlerClass=CGIHTTPRequestHandler, +ServerClass=i2p.BaseHTTPServer.HTTPServer, +session='mytestxxx.i2p') + diff --git a/apps/sam/python/doc/guide/wiki/i2p.SimpleHTTPServer.txt b/apps/sam/python/doc/guide/wiki/i2p.SimpleHTTPServer.txt new file mode 100644 index 000000000..7a197a1a5 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.SimpleHTTPServer.txt @@ -0,0 +1,45 @@ +Title: User's Guide:i2p.SimpleHTTPServer + +Emulates Python SimpleHTTPServer module using I2P sockets. + +== Overview == + +The Python module is described at http://www.python.org/doc/current/lib/module-SimpleHTTPServer.html + +To get a server going, use: + + + +Consult the documentation for function test() to change basic server settings, such as the session name. + +A fully customizable example: + + + +== Classes == + +class '''SimpleHTTPRequestHandler''' + + +== Functions == + +'''test'''(HandlerClass=SimpleHTTPRequestHandler, ServerClass= i2p.BaseHTTPServer.HTTPServer, session='mytestxxx.i2p') + diff --git a/apps/sam/python/doc/guide/wiki/i2p.SocketServer.txt b/apps/sam/python/doc/guide/wiki/i2p.SocketServer.txt new file mode 100644 index 000000000..e7fed4d81 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.SocketServer.txt @@ -0,0 +1,22 @@ +Title: User's Guide:i2p.SocketServer + +Emulates Python SocketServer module using I2P sockets. + +The Python module is described at http://www.python.org/doc/current/lib/module-SocketServer.html + +== Classes == + + diff --git a/apps/sam/python/doc/guide/wiki/i2p.router.txt b/apps/sam/python/doc/guide/wiki/i2p.router.txt index c1bd36e90..0d25bd91a 100644 --- a/apps/sam/python/doc/guide/wiki/i2p.router.txt +++ b/apps/sam/python/doc/guide/wiki/i2p.router.txt @@ -19,8 +19,8 @@ Module i2p.router allows Python programs to control the I2P router. Find the absolute path to a locally installed I2P router. An I2P installation is located by looking in the - environment I2P, then in PATH, then in the dir argument - given to the function. It looks for startRouter.sh or + dir argument given to the function, then in the environment + I2P, then in PATH. It looks for startRouter.sh or startRouter.bat. Raises ValueError if an I2P installation could not be located. diff --git a/apps/sam/python/doc/guide/wiki/i2p.select.txt b/apps/sam/python/doc/guide/wiki/i2p.select.txt new file mode 100644 index 000000000..fa48ceac6 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.select.txt @@ -0,0 +1,27 @@ +Title: User's Guide:i2p.select + +Module i2p.select emulates the Python module select. + +With this module, a program can perform select and poll commands on traditional and I2P sockets. + +'''poll'''() + + +'''select'''(readlist, writelist, errlist, timeout=None) + + +'''Polling flags''' + diff --git a/apps/sam/python/doc/guide/wiki/i2p.socket.txt b/apps/sam/python/doc/guide/wiki/i2p.socket.txt new file mode 100644 index 000000000..d6e22531b --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.socket.txt @@ -0,0 +1,276 @@ +Title: User's Guide:i2p.socket + +Module i2p.socket allows Python programs to access the [[SAM proxy]]. It emulates the Python module socket. + +With this module, a program can send stream data, datagrams, and raw packets across the I2P network. + +== Sockets == + +class '''socket'''(session, type, samaddr='127.0.0.1:7656', **kwargs) + +The class socket defines the following properties: + + +The class socket defines the following methods: + +'''accept'''(self) + +'''bind'''(self, address) + +'''close'''(self) + +'''connect'''(self, address) + +'''connect_ex'''(self, address) + +'''getpeername'''(self) + +'''getsockname'''(self) + +'''gettimeout'''(self) + +'''listen'''(self, backlog) + +'''makefile'''(self, mode='r', bufsize=-1) + +'''recv'''(self, bufsize, flags=0) + +'''recvfrom'''(self, bufsize, flags=0) + +'''send'''(self, string, flags=0) + +'''sendall'''(self, string, flags=0) + +'''sendto'''(self, string, flags, address) + +'''setblocking'''(self, flag) + +'''settimeout'''(self, value) + + +== Functions == + +Functions defined in module i2p.socket: + +'''resolve'''(host, samaddr='127.0.0.1:7656') + + +== Errors == + +class '''Error'''(i2p.Error) + +class '''BlockError'''(Error) + +class '''ClosedError'''(Error) + +class '''NetworkError'''(Error) + + +== Constants == + +'''Socket types''' + +'''Packet sizes''' + +'''Flags for recv()''' + diff --git a/apps/sam/python/doc/guide/wiki/i2p.tunnel.txt b/apps/sam/python/doc/guide/wiki/i2p.tunnel.txt new file mode 100644 index 000000000..0d64498a3 --- /dev/null +++ b/apps/sam/python/doc/guide/wiki/i2p.tunnel.txt @@ -0,0 +1,79 @@ +Title: User's Guide:i2p.tunnel + +Module i2p.tunnel allows data to be exchanged between traditional TCP sockets and I2P sockets. + +== Tunnels == + +Tunnels allow stream sockets to be joined, so that connections to a listening socket are relayed to one or more sending sockets. This allows an ordinary web server to be exposed as an I2P Destination, or an I2P Destination to be bound as a local port, and so on. + +class '''Tunnel'''(self, receive, make_send, nconnect=-1, timeout=60.0) + + +'''close'''() + + +=== Tunnel Server === + +class '''TunnelServer'''(session, port, samaddr='127.0.0.1:7656', nconnect=-1, timeout=None, **kwargs) + + +'''TunnelServer''' properties: + + +=== Tunnel Client === + +class '''TunnelClient'''(session, port, dest, samaddr='127.0.0.1:7656', nconnect=-1, timeout=None, **kwargs) + + +'''TunnelClient''' properties: + diff --git a/apps/sam/python/doc/guide/wiki/i2p.txt b/apps/sam/python/doc/guide/wiki/i2p.txt index 2f69348f8..4ceda5328 100644 --- a/apps/sam/python/doc/guide/wiki/i2p.txt +++ b/apps/sam/python/doc/guide/wiki/i2p.txt @@ -2,15 +2,19 @@ Title: User's Guide:i2p Package i2p is a container package for more specific modules. -It exports the following names: - +It contains the following modules: + class '''Error'''(Exception):