in reply to Sending problem in UDP

Size of UDP datagram is limited by the size of IP datagram (65535 bytes), but some system limit it even more, usually 8k. If size of resulting IP datagram more than MTU size it will be fragmented. If you plan to send file using UDP you should split into chunks and send as sequence of UDP packets, note that you should include some information into UDP packets which allow you to check that all packets are received and their order is right. But probably TCP is your choice. If you still wanna use UDP, took a look onto TFTP specification RFC 1350.

Stevens mentioned in the above post is great.