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

Method startUDPSocket

src/network/connectionpool.py:115–124  ·  view source on GitHub ↗
(self, bind=None)

Source from the content-addressed store, hash-verified

113 self.listeningSockets[ls.destination] = ls
114
115 def startUDPSocket(self, bind=None):
116 if bind is None:
117 host = self.getListeningIP()
118 udpSocket = UDPSocket(host=host, announcing=True)
119 else:
120 if bind is False:
121 udpSocket = UDPSocket(announcing=False)
122 else:
123 udpSocket = UDPSocket(host=bind, announcing=True)
124 self.udpSockets[udpSocket.listening.host] = udpSocket
125
126 def loop(self):
127 # defaults to empty loop if outbound connections are maxed

Callers 1

loopMethod · 0.95

Calls 2

getListeningIPMethod · 0.95
UDPSocketClass · 0.90

Tested by

no test coverage detected