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.

This commit is contained in:
Lachezar Todorov 2021-10-19 14:13:08 -04:00
parent 2e47014923
commit 9a4225751a

37
src/py-cli/make_sockets.py Executable file
View File

@ -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()