MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / __init__

Method __init__

src/network/proxy.py:82–93  ·  view source on GitHub ↗
(self, address)

Source from the content-addressed store, hash-verified

80 self.__class__._onion_auth = authTuple
81
82 def __init__(self, address):
83 if not isinstance(address, state.Peer):
84 raise ValueError
85 AdvancedDispatcher.__init__(self)
86 self.destination = address
87 self.isOutbound = True
88 self.fullyEstablished = False
89 self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
90 if address.host.endswith(".onion") and self.onion_proxy is not None:
91 self.connect(self.onion_proxy)
92 else:
93 self.connect(self.proxy)
94
95 def handle_connect(self):
96 self.set_state("init")

Callers 1

__init__Method · 0.45

Calls 2

create_socketMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected