38 lines
735 B
Python
Executable File
38 lines
735 B
Python
Executable File
"""
|
|
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()
|
|
|