Skip to content

Commit

Permalink
make setting multicast opts optional for oscclient, oops
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Jan 6, 2024
1 parent e00f1a4 commit 67b80a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions microosc.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ def __init__(self, socket_source, host, port, buf_size=128):
self._sock = self._socket_source.socket(
self._socket_source.AF_INET, self._socket_source.SOCK_DGRAM
)
# TODO: check for IP address type? (multicast/unicast)
ttl = 2
self._sock.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, ttl)
if self.host.startswith("224"): # multicast
ttl = 2 # TODO: make this an arg?
self._sock.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, ttl)

def send(self, msg):
"""
Expand Down

0 comments on commit 67b80a0

Please sign in to comment.