This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Im making a client-server program, in which the client requests a file and the server sends it. Everything runs fine, if the file name is hardcoded in the server.. Here is the code for both sides managing the sending, and please, if you have time, could you explain some more? I just started networking, but i need to create this program asap :|
You didn't say what you need explained. You only told us that the code worked correctly under certain circumstances, but not what happened otherwise. So I don't see a question here. Perhaps you could ask something specific?
Joined: Dec 12, 2012
Why is there an error, that the sockets are closed? Luckily i think i found the answer to that, closing a stream associated with a socket, closes the socket, am i right?
Are there any comments, recomendations on the code, it is now fully working, but i want to double check.