Assume there are two programs running on the same computer at the same time. The computer is connected to a LAN. The two programs communicate via a TCP socket, and the socket is opened using the IP address of the computer on the network, for example 192.168.x.x
In this case, can someone having control over the router, but not over the computer, see anything? (either just the connection being prepared, or the data itself) Do any packets ever leave the computer? Would it make a difference if the client connected to 127.0.0.1 instead of 192.168.x.x ?