mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
initial import of Connelly's public domain I2P python lib
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
# -----------------------------------------------
|
||||
# stream.py: Simple stream client
|
||||
# -----------------------------------------------
|
||||
|
||||
from i2p import sam
|
||||
|
||||
S = sam.socket('Alice', sam.SOCK_STREAM)
|
||||
S.connect('duck.i2p')
|
||||
S.send('GET / HTTP/1.0\r\n\r\n') # Send request
|
||||
print S.recv(1000) # Read up to 1000 bytes
|
||||
Reference in New Issue
Block a user