From 9a4225751a93425f06ad49131da8b9a7a86f2e48 Mon Sep 17 00:00:00 2001 From: Lachezar Todorov Date: Tue, 19 Oct 2021 14:13:08 -0400 Subject: [PATCH] Made bare bone server that runs. Looking to add proper login and logout functions that users will use to connect and disconnect with the server. --- src/py-cli/make_sockets.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 src/py-cli/make_sockets.py diff --git a/src/py-cli/make_sockets.py b/src/py-cli/make_sockets.py new file mode 100755 index 0000000..85f5eae --- /dev/null +++ b/src/py-cli/make_sockets.py @@ -0,0 +1,37 @@ +""" +A file that makes a bunch of sockets + +@author Lachezar Todorov +""" + +class WebSockestServerExternal(): + + def __init__(self): + self.wsl = [10] + self.count = 0 + + + #start session + def login(self, name): + self.wsl[self.count] = name + self.count += 1 + self.printing() + + #exit session + def logout(self, name): + for name in self.wsl: + if name == name: + index = self.wsl.index(name) + self.wsl[index] = "" + self.printing() + + #print out the list + def printing(self): + for name in self.wsl: + print(name) + +WebSockestServerExternal() + +#alice.login() +#alice.logout() +