Copies a file to a network socket