File transfer using sockets