MCPcopy Create free account
hub / github.com/andreikop/python-ws-discovery / addSourceAddr

Method addSourceAddr

wsdiscovery/threaded.py:148–157  ·  view source on GitHub ↗

None means 'system default

(self, addr)

Source from the content-addressed store, hash-verified

146 return sock
147
148 def addSourceAddr(self, addr):
149 """None means 'system default'"""
150 try:
151 self._multiInSocket.setsockopt(self._get_ip_proto(), self._get_ip_join(), self._makeMreq(addr))
152 except socket.error as e:
153 logger.debug(f"Interface has more than 1 address: {e}")
154
155 sock = self._createMulticastOutSocket(addr, self._observer.ttl)
156 self._multiOutUniInSockets[addr] = sock
157 self._selector.register(sock, selectors.EVENT_READ)
158
159 def removeSourceAddr(self, addr):
160 try:

Callers 3

addSourceAddrMethod · 0.45
_networkAddressAddedMethod · 0.45
_networkAddressAddedMethod · 0.45

Calls 4

_get_ip_protoMethod · 0.95
_get_ip_joinMethod · 0.95
_makeMreqMethod · 0.95

Tested by

no test coverage detected