private void handleError(JsonObject message)
        {
            long   code   = (long)message[ProtocolConstants.ERR_CODE_FIELD];
            String reason = (String)message[ProtocolConstants.REASON_FIELD];

            // The server is sending an error to the client.
            // Possible errors include:
            //   BAD_SUBSCRIBER_ID a subscription ID is null or does not start
            //                     with the client ID
            //   SEND_DISALLOWED sending is disabled for this user

            listener.OnError(this, Convert.ToInt32(code), reason);
        }