I'm not sure I understand, but if you have two pc's connected to eachother you can simply have one set up as server and the other as client (or the other way around), right?

Or, for testing purposes run one server program and one (or more) client(s) all on the same pc and let them connect to localhost.