From bb0ba68bbc7bffe292974ab00344d0e3de956366 Mon Sep 17 00:00:00 2001 From: BB Date: Mon, 8 May 2023 03:29:26 +0000 Subject: [PATCH] netgenie-srv: Updated README. --- server/NetGenieSrv.py | 11 ++--------- server/README.md | 9 +++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) 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