sample socket send file
variable file length handled