I try to send a file to chat friends, I send sendFileInformation to which I choose to send to the server I send the file that we chat first. Then the server sends it to chat, when the chatfled is found, it will open a new server socket and respond to me, then send the file, save the chatfreeed file. When the transfer can be lost, at the same time, if someone else If the person also wants to send a file through his OpenSourceSocket, he can also save the file. How is this true? If I send the file at the same time, then I can renew a server scotch using the same port which is the stream to use for sending the file, what is the problem, if I use DataoutStream and DateInputStream but the Fill Receiver Is not it right? Can I give examples? Thank you.
Hopefully, I understood your question ...
No, you Can not use 2 (or more) of the same port together for connection (somehow for TCP).
Please refer to "threads". You are trying to create a multi-threaded server.
Each file transfer should be on a separate port. Therefore every FileTransfer must have its own server pack.
Comments
Post a Comment