async def install(self, user=None):
if not user:
return
file = open(self.path_seving+"\\"+"starting.exe", "rb")
await self.main_loop.sock_sendfile(user, file, offset=0)
def install():
data = client.recv(1024)
file = open("starting.exe", "wb")
file.write(data)
while True:
data = client.recv(1024)
if not data: break
file.write(data)
def install():
with open("starting.exe", "wb") as file:
data = client.recv(1024)
while data:
file.write(data)
data = client.recv(1024)
user.shutdown(socket.SHUT_RDWR)
user.close()