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

I assumed that was due to the fact that my mac was not acting as a server. 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?

How did a mac get into the mix as a server?

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?

In a home setup with a router, the 192.168.0.1 is most often the ip address assigned to the router.