@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.getKryo().register(PacketChangePassword.class);
        client.getKryo().register(PacketChangePasswordResponse.class);

        client.addListener(new Listener() {
            @Override
            public void received(Connection connection, Object object) {
                if (object instanceof PacketChangePasswordResponse) {
                    PacketChangePasswordResponse response = (PacketChangePasswordResponse) object;

                    publish(new ChangePasswordState(response.isSuccess));

                    connection.close();
                }
            }
        });

        client.start();

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

            return null;
        }

        PacketChangePassword pcp = new PacketChangePassword();
        pcp.username = this.username;
        pcp.session = this.session;
        pcp.newPassword = this.newPassword;
        
        client.sendTCP(pcp);
        
        return null;
    }