Conditions | 3 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import dotenv |
||
8 | def main(): |
||
9 | print("Starting Client...") |
||
10 | |||
11 | config = dotenv.dotenv_values('.env') |
||
12 | |||
13 | ip = config.get('ip') |
||
14 | if not ip: |
||
15 | print("No server address were specified.") |
||
16 | return |
||
17 | |||
18 | port = config.get('port') |
||
19 | if not port: |
||
20 | print("No server port were specified.") |
||
21 | return |
||
22 | |||
23 | client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
||
24 | |||
25 | client_socket.connect((ip, port)) |
||
26 | client_socket.setblocking(False) |
||
27 | |||
28 | app = App(Client(client_socket)) |
||
29 | |||
33 |