Senior Design project help, sending message over tcp to motor drive for robot

ear36:
Are there any problems with my code that wouldn't allow me to connect to a server at the ip 192.168.0.1 and port 5002?

Port blocked, firewall, different subnet, ip address conflict...