The problems you had by simply packetizing and sendind data are related to the dispatch time and network latency that are not relevanto for static data transmission as files.
You may want have a look to
RTP (real time protocol) for transmission of real time data as audio and video.
This page from Gary Mc Gath give some starting points about some diffused protocols.