I am learning java, I am doing file transfer using UDP protocol, my problem is I can not create a new file server, please help me
this is my code
client
server
someone can help me how to transfer any file (jpg, avi, doc, etc.) from client to server??
I thank you very much
And why are you using UDP for file transfer? Are you willing to accept chunks going missing or arriving out of order? Or are you going to implement sequencing and retransmission--which TCP give you for free?
My problem is when the client read the file put in the package sent to the server, the server receives the packet and create the same file in client but nothing is written to the file.
I use UDP because it is my homework, I have the idea that every time the client transfer packet will numbered order packets if the packet is missing or arriving out of order, the client will send back
Seems like it's time to do some debugging. That starts with observing what your program is doing. Add print statements in your server so you can see which bytes you're receiving, how big the packets are, and how often the loop body is being executed. Likewise, add print statements to the client so that you can verify what it's sending.
Post by:autobot
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, that will fit in a stocking