@Override
    protected Void doInBackground() throws Exception {
        final int BUFFER_SIZE = 10000;
        Client client = new Client(BUFFER_SIZE, BUFFER_SIZE);

        client.getKryo().register(PacketLogin.class);
        client.getKryo().register(PacketLoginResponse.class);
        client.getKryo().register(PacketRequestCaptcha.class);
        client.getKryo().register(PacketCaptchaImage.class);
        client.getKryo().register(byte[].class);
        client.getKryo().register(PacketRegister.class);
        client.getKryo().register(PacketRegistered.class);
        client.getKryo().register(PacketFilesListRequest.class);
        client.getKryo().register(PacketFilesList.class);
        client.getKryo().register(String[].class);


        client.addListener(new Listener() {
            @Override
            public void received(Connection connection, Object object) {
                if (object instanceof PacketFilesList) {
                    PacketFilesList response = (PacketFilesList) object;
                    System.out.println("[Sync] Got files: " + response.numFiles + " | " + response.files);

                    publish(new FilesListState(response));

                    connection.close();
                }
            }
        });

        client.start();

        try {
            client.connect(5000, Constants.SERVER_HOST, Constants.SERVER_PORT);
        } catch (Exception e) {
            e.printStackTrace();

            return null;
        }

        Thread.sleep(1000);
        PacketFilesListRequest req = new PacketFilesListRequest();
        req.clientPrefix = this.prefix;
        
        client.sendTCP(req);


        return null;
    }