Get a beacon socket

def get_beacon():
    "Get a beacon socket"
    s = _socket.socket(_socket.AF_INET, _socket.SOCK_DGRAM)
    s.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, True)
    s.setsockopt(_socket.SOL_SOCKET, _socket.SO_BROADCAST, True)
    return s