lan client thread added
This commit is contained in:
		
							parent
							
								
									3c6b3652c6
								
							
						
					
					
						commit
						d77f802fdd
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		|  | @ -36,4 +36,5 @@ class LANManager: | ||||||
|     def start(self): |     def start(self): | ||||||
|         Thread(target=learn_services, args=[self.peers], daemon=True).start() |         Thread(target=learn_services, args=[self.peers], daemon=True).start() | ||||||
|         Thread(target=advertise_service, daemon=True).start() |         Thread(target=advertise_service, daemon=True).start() | ||||||
|  |         Thread(target=self.too_many.get(Client, (self.peers,)).start, daemon=True).start() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,6 +2,9 @@ | ||||||
| 
 | 
 | ||||||
| LAN transport client thread | 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 |     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 |     it under the terms of the GNU General Public License as published by | ||||||
|  | @ -19,5 +22,11 @@ LAN transport client thread | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class Client: | class Client: | ||||||
|     def __init__(self): |     def __init__(self, peer_list: List): | ||||||
|  |         self.peers = peer_list | ||||||
|         return |         return | ||||||
|  | 
 | ||||||
|  |     def start(self): | ||||||
|  |         while True: | ||||||
|  |             print(1, self.peers) | ||||||
|  |             better_sleep(1) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue