I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 823f4a26 authored by connelly's avatar connelly Committed by zzz
Browse files

patch was unnecessary. kept docstrings.

parent a05e8a44
No related branches found
No related tags found
No related merge requests found
......@@ -238,20 +238,19 @@ class Socket:
pass
self.closed = True
def connect(self, address, **kw):
def connect(self, address):
"""
Attempts to connect to a remote dest, identified in local
SAM bridge's hosts file as host 'address'.
Connect to a remote dest, identified in local SAM bridge's hosts
file as host 'address'.
For example:
s.connect("duck.i2p")
s.connect('duck.i2p')
You can pass a keyword 'dontResolve', which if true,
allows you to pass the base64 destination as the address, and
override the hostname lookup.
Alternatively, you can use a full base64 Destination:
For example:
s.connect("238797sdfh2k34kjh....AAAA")
s.connect('238797sdfh2k34kjh....AAAA')
"""
# Synchronized. Lock prevents two connects from occurring at the
# same time in different threads.
......@@ -264,10 +263,7 @@ class Socket:
self._verify_not_connected()
# patched by aum - allow caller to pass in raw base64 dest,
# and prevent the name lookup attempt
if not kw.get('dontResolve', 1):
address = resolve(address, self.samaddr)
address = resolve(address, self.samaddr)
timeout = self.timeout
unwrap = self.sessobj.connect(address, timeout=timeout)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment