I'm writing a peer to peer network in c# with .net 3.
I'm using a tcp/ip architecture where each device acts as both a client and a server.
If one pc wants to download a file from another, how will it know what port the server on the other pc is listening on?
Because they both need to connect to the same port for a connection to be made

I'm writing a peer to peer network in c# with .net 3.
I'm using a tcp/ip architecture where each device acts as both a client and a server.
If one pc wants to download a file from another, how will it know what port the server on the other pc is listening on?
Because they both need to connect to the same port for a connection to be made

for this you should really understand the OSI model and how router works.

i would give you more but there is only so much i can say.