feat: containerized everything

- UDP server will now bound to all interfaces
- Added instructions for docker setup
This commit is contained in:
2023-11-27 04:24:47 -05:00
parent a7eecc36de
commit fa544ac1fb
6 changed files with 101 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ class UDPClient:
f"myftp> - {self.mode} - : Invalid command. Supported commands are put, get, summary, change and help"
)
# handling the "bye" command
if command == "bye":
client_socket.close()
print(f"myftp> - {self.mode} - Session is terminated")

View File

@@ -59,6 +59,14 @@ def init():
help="Port number for the server. Default = 12000",
)
parser.add_argument(
"--ip_addr",
default="0.0.0.0",
required=False,
type=str,
help="Port number for the server. Default = 12000",
)
parser.add_argument(
"--debug",
type=int,
@@ -76,7 +84,7 @@ def init():
# UDP client selected here
if protocol_selection == "2":
udp_server = UDPServer("127.0.0.1", args.port_number, args.debug)
udp_server = UDPServer(args.ip_addr, args.port_number, args.debug)
udp_server.run()