using c to complish file transfer