Commit a62c4e9c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7cc29499
...@@ -34,11 +34,10 @@ def mjoin_tx(group, port, ttl=2): ...@@ -34,11 +34,10 @@ def mjoin_tx(group, port, ttl=2):
sk, ip6 = _udpsockfor(group) sk, ip6 = _udpsockfor(group)
# set ttl and default destination address (for tx) # set ttl and default destination address (for tx)
bttl = pack('b', ttl)
if ip6: if ip6:
sk.setsockopt(IPPROTO_IPV6, IPV6_MULTICAST_HOPS, bttl) sk.setsockopt(IPPROTO_IPV6, IPV6_MULTICAST_HOPS, ttl)
else: else:
sk.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, bttl) sk.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, ttl)
sk.connect((group, port)) sk.connect((group, port))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment