|
2 | 2 | import threading
|
3 | 3 | import os
|
4 | 4 | import config
|
| 5 | +import time |
5 | 6 |
|
6 | 7 | # set directory for file server
|
7 | 8 | root = "Root/"
|
@@ -132,29 +133,33 @@ def main():
|
132 | 133 | thread_listen_server.daemon = True
|
133 | 134 | thread_listen_server.start()
|
134 | 135 |
|
135 |
| - # SERVER A |
136 |
| - server_socket.connect( |
137 |
| - (config.SERVER_B_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
138 |
| - server_socket.connect( |
139 |
| - (config.SERVER_C_CONFIG['host'], config.SERVER_C_CONFIG['port'])) |
| 136 | + # # SERVER A |
| 137 | + # server_socket.connect( |
| 138 | + # (config.SERVER_B_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
| 139 | + # server_socket.connect( |
| 140 | + # (config.SERVER_C_CONFIG['host'], config.SERVER_C_CONFIG['port'])) |
140 | 141 |
|
141 |
| - # SERVER B |
142 |
| - server_socket.connect( |
143 |
| - (config.SERVER_A_CONFIG['host'], config.SERVER_A_CONFIG['port'])) |
144 |
| - server_socket.connect( |
145 |
| - (config.SERVER_C_CONFIG['host'], config.SERVER_C_CONFIG['port'])) |
| 142 | + # # SERVER B |
| 143 | + # server_socket.connect( |
| 144 | + # (config.SERVER_A_CONFIG['host'], config.SERVER_A_CONFIG['port'])) |
| 145 | + # server_socket.connect( |
| 146 | + # (config.SERVER_C_CONFIG['host'], config.SERVER_C_CONFIG['port'])) |
146 | 147 |
|
147 |
| - # SERVER C |
148 |
| - server_socket.connect( |
149 |
| - (config.SERVER_A_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
150 |
| - server_socket.connect( |
151 |
| - (config.SERVER_B_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
| 148 | + # # SERVER C |
| 149 | + # server_socket.connect( |
| 150 | + # (config.SERVER_A_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
| 151 | + # server_socket.connect( |
| 152 | + # (config.SERVER_B_CONFIG['host'], config.SERVER_B_CONFIG['port'])) |
152 | 153 |
|
153 | 154 | thread_listen_client = threading.Thread(
|
154 | 155 | target=listen_client, kwargs={"clientsocket": client_socket}
|
155 | 156 | )
|
156 | 157 | thread_listen_client.daemon = True
|
157 | 158 | thread_listen_client.start()
|
158 | 159 |
|
| 160 | + while True: |
| 161 | + time.sleep(5) |
| 162 | + print("server is awake") |
| 163 | + |
159 | 164 |
|
160 | 165 | main()
|
0 commit comments