From file to socket