select ap and receive file from socket