Is it possible to make a program that is both a client and a server, then run the same app twice while testing it on the same computer from the same ISP and IP, to test whether it will send a file over the internet to a remote computer?

Of all the things I've lost I miss my mind the most