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

Method __init__

src/upnp.py:181–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

179 SSDP_ST = "urn:schemas-upnp-org:device:InternetGatewayDevice:1"
180
181 def __init__ (self):
182 threading.Thread.__init__(self, name="uPnPThread")
183 try:
184 self.extPort = BMConfigParser().getint('bitmessagesettings', 'extport')
185 except:
186 self.extPort = None
187 self.localIP = self.getLocalIP()
188 self.routers = []
189 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
190 self.sock.bind((self.localIP, 0))
191 self.sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
192 self.sock.settimeout(5)
193 self.sendSleep = 60
194 self.initStop()
195
196 def run(self):
197 from debug import logger

Callers

nothing calls this directly

Calls 5

getLocalIPMethod · 0.95
BMConfigParserClass · 0.90
bindMethod · 0.80
initStopMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected