-
Notifications
You must be signed in to change notification settings - Fork 107
Zeroconf support for headless server #648
base: master
Are you sure you want to change the base?
Conversation
How about also adding a basic CLI command for scanning for Freeseer servers? |
69fd00c
to
a044d69
Compare
def setup_parser_discover(subparsers): | ||
"""Setup discover command parser""" | ||
parsers = subparsers.add_parser('discover', help='Search for freeseer servers on the network') | ||
parsers.add_argument("-t", "--timeout", help="Poll for freeseer servers continually", action="store") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default action is 'store', and you can avoid int(...)
later on by setting type=int
. Furthermore I think argparse
will also automatically add '-t' if it sees '--timeout'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to explicitly declare '-t' for it to be a command line option.
Why don't you move this stuff into its own submodule folder? It seems weird having it mixed with the rest of the API stuff, especially since you have it separated into announcer.py and listener.py. |
Allow flask server to broadcast over public ip. Use Zeroconf protocol to publish the service (using avahi), allowing any client with Zeroconf to search and connect to any Freeseer client on their network.