-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_connection.py
More file actions
41 lines (37 loc) · 1.31 KB
/
test_connection.py
File metadata and controls
41 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Quick connection test - Run this on the OTHER laptop
"""
import socket
SERVER_IP = "10.48.231.133" # Change this to your server IP
SERVER_PORT = 5555
print("=" * 60)
print("CONNECTION TEST")
print("=" * 60)
print(f"Attempting to connect to {SERVER_IP}:{SERVER_PORT}")
print()
try:
test_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
test_socket.settimeout(5)
test_socket.connect((SERVER_IP, SERVER_PORT))
print("✓ CONNECTION SUCCESSFUL!")
print("The other laptop CAN connect to the server.")
print()
print("If client_viewer.py still shows only 1 client,")
print("make sure you're using the correct IP in the app.")
test_socket.close()
except socket.timeout:
print("✗ CONNECTION TIMEOUT")
print("Server is not responding. Check:")
print("1. Server is running (python blender_server.py)")
print("2. Both devices on same WiFi network")
print("3. Firewall is not blocking port 5555")
except ConnectionRefusedError:
print("✗ CONNECTION REFUSED")
print("Server is not accepting connections. Check:")
print("1. Server is running on the other laptop")
print("2. Port 5555 is not blocked by firewall")
except Exception as e:
print(f"✗ CONNECTION FAILED: {e}")
print("Check network settings")
print("=" * 60)
input("Press Enter to exit...")