diff --git a/server/NetGenieSrv.py b/server/NetGenieSrv.py index 53d1153..2898efd 100644 --- a/server/NetGenieSrv.py +++ b/server/NetGenieSrv.py @@ -158,17 +158,10 @@ def parseArgs(): def main(): """ The NGServer class implements our NetGenie debug/bridge server. - - ng = NGServer(bridge_ip=args.bridge_ip, - bridge_port=args.bridge_port, - ioip=args.ioip, - incoming_port=args.incoming_port, - outgoing_port=args.outgoing_port) - - # asyncio.run(start_thread(ng)) """ + # Get the arguments args = parseArgs() - + # Start the server. startServerAndWait(args) if __name__ == '__main__': diff --git a/server/README.md b/server/README.md index f13dee6..b2b58ee 100644 --- a/server/README.md +++ b/server/README.md @@ -39,6 +39,15 @@ options: The port that the person debugging will write packets to the device. ``` +You can also start NetGenieSrv from a python REPL as follows: + +```bash +In [1]: import NetGenieSrv as ngs +In [2]: ng = ngs.NGServer(bridge_ip='0.0.0.0') +In [3]: ngs.startThread(ng) + +``` + ## Using the server ```bash