Skip to content

Commit

Permalink
IPv6 Support on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Kelly committed Dec 26, 2018
1 parent dcf5d83 commit f167be9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
File renamed without changes.
16 changes: 14 additions & 2 deletions python/timing_clock_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
import struct
import time

s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
local_port = 5006

s.connect( ("localhost", 5006 ) )
if len(sys.argv) == 1:
family = socket.AF_INET
connect_tuple = ( 'localhost', local_port )
else:
details = socket.getaddrinfo( sys.argv[1], local_port, socket.AF_UNSPEC, socket.SOCK_DGRAM)
family = details[0][0]
if family == socket.AF_INET6:
connect_tuple = ( sys.argv[1], local_port, 0, 0)
else:
connect_tuple = ( sys.argv[1], local_port)

s = socket.socket( family, socket.SOCK_DGRAM )
s.connect( connect_tuple )

# Timing Clock
bytes = struct.pack( "BB", 0xaa, 0xF8)
Expand Down
2 changes: 1 addition & 1 deletion raveloxmidi/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE(raveloxmidi, 0.5.5)
AM_INIT_AUTOMAKE(raveloxmidi, 0.6.0)
AC_CONFIG_HEADERS([config.h])

AC_GNU_SOURCE
Expand Down

0 comments on commit f167be9

Please sign in to comment.