12-10-2022, 04:39 AM
A lot of the problem with TCP/IP communications is your system protecting you from yourself. Is your firewall allowing the programs to communicate back and fort? Are the router ports opened for two-way traffic? Is your anti-virus detection being stupidly obnoxious and preventing one from executing properly? Is your UAC protections too severe to allow the connections?
99.99999987% of the time the issue is one of those things interfering with execution, and they're issues that are almost impossible to diagnose or fix via something like forum help.
My advice: Disable EVERYTHING you can while trying to get it going. Turn off any damn windows security feature you can find. (Just don't forget to re-enable when you're done.)
If that doesn't work, my next guess is in your router itself. You need to set up port forwarding, or open a port on the router to allow two-way communications.
If THAT doesn't work, ask yourself: "Are my machines REALLY on the same network??" My main PC is hardwired directly into my main router. My laptop runs off a wifi router -- which is plugged into my main router. IT'S SUBROUTED and **NOT** a local connection to my PC. Hell, even my iPad and my laptop are on *two different* networks -- even though they're both on the same wireless router -- because one runs on 2.3GHZ channels and the other on 6.0GHZ...
If the machines aren't on the *exact same* network, localhost isn't going to work. You'll need their IP address, a dedicated port opened and forwarded for them to communicate across, and you'll need to make certain to use that port in your code.
TCP/IP is a wee bit more complicated than just writing to a shared network drive. Hackers and viruses have pushed the technology to the point where it protects us from so much, it protects us from ourselves -- even when we don't want it too!!
99.99999987% of the time the issue is one of those things interfering with execution, and they're issues that are almost impossible to diagnose or fix via something like forum help.
My advice: Disable EVERYTHING you can while trying to get it going. Turn off any damn windows security feature you can find. (Just don't forget to re-enable when you're done.)
If that doesn't work, my next guess is in your router itself. You need to set up port forwarding, or open a port on the router to allow two-way communications.
If THAT doesn't work, ask yourself: "Are my machines REALLY on the same network??" My main PC is hardwired directly into my main router. My laptop runs off a wifi router -- which is plugged into my main router. IT'S SUBROUTED and **NOT** a local connection to my PC. Hell, even my iPad and my laptop are on *two different* networks -- even though they're both on the same wireless router -- because one runs on 2.3GHZ channels and the other on 6.0GHZ...
If the machines aren't on the *exact same* network, localhost isn't going to work. You'll need their IP address, a dedicated port opened and forwarded for them to communicate across, and you'll need to make certain to use that port in your code.
TCP/IP is a wee bit more complicated than just writing to a shared network drive. Hackers and viruses have pushed the technology to the point where it protects us from so much, it protects us from ourselves -- even when we don't want it too!!