patch was unnecessary. kept docstrings.

This commit is contained in:
connelly
2004-07-31 10:45:47 +00:00
committed by zzz
parent a05e8a446d
commit 823f4a26b3

View File

@ -238,20 +238,19 @@ class Socket:
pass pass
self.closed = True self.closed = True
def connect(self, address, **kw): def connect(self, address):
""" """
Attempts to connect to a remote dest, identified in local Connect to a remote dest, identified in local SAM bridge's hosts
SAM bridge's hosts file as host 'address'. file as host 'address'.
For example: For example:
s.connect("duck.i2p") s.connect('duck.i2p')
You can pass a keyword 'dontResolve', which if true, Alternatively, you can use a full base64 Destination:
allows you to pass the base64 destination as the address, and
override the hostname lookup.
For example: For example:
s.connect("238797sdfh2k34kjh....AAAA") s.connect('238797sdfh2k34kjh....AAAA')
""" """
# Synchronized. Lock prevents two connects from occurring at the # Synchronized. Lock prevents two connects from occurring at the
# same time in different threads. # same time in different threads.
@ -264,9 +263,6 @@ class Socket:
self._verify_not_connected() 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 timeout = self.timeout