This content has been marked as final. Show 1 reply
836981 wrote:Read up on peer-to-peer.
I want to make a file transfer application for multiple clients, there will not be a server that users will connect to, the application serves as client AND server, every client will have a serversocket object listen for new connections (it will receive a connection when someone wants to send a file to them)
and I will also have a socket object that will connect to a client when I want to send a file to them.A new socket for each outbound connection.
Is it possible to run all these connections on a single port?Yes. A serversocket listens for connections to a specific port number, it can accept many connections.
Or will there be a conflict?No. Your outbound connections will not use the same port number locally.
You are more likely to encounter problems with clients (peers) behind NAT routers.