Forums Register Login

transfer files from client to server using the UDP protocol

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
What exact problem are you having? Note that ItDoesntWorkIsUseless(←click).

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?
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
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
https://gardener-gift.com


reply
reply
This thread has been viewed 24062 times.
Similar Threads
Pinger time!
developing tftp application in java
socket udp programming
Simple problem in running a Server class
Developing tftp application in java
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:34:42.