lan client thread added

This commit is contained in:
Kevin Froman 2020-03-23 00:37:49 -05:00
parent 3c6b3652c6
commit d77f802fdd
2 changed files with 11 additions and 1 deletions

View File

@ -36,4 +36,5 @@ class LANManager:
def start(self):
Thread(target=learn_services, args=[self.peers], daemon=True).start()
Thread(target=advertise_service, daemon=True).start()
Thread(target=self.too_many.get(Client, (self.peers,)).start, daemon=True).start()

View File

@ -2,6 +2,9 @@
LAN transport client thread
"""
from typing import List
from utils.bettersleep import better_sleep
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,5 +22,11 @@ LAN transport client thread
class Client:
def __init__(self):
def __init__(self, peer_list: List):
self.peers = peer_list
return
def start(self):
while True:
print(1, self.peers)
better_sleep(1)