[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] MI: Replace sequence number with ID

From: Jose E. Marchesi
Subject: Re: [PATCH v2] MI: Replace sequence number with ID
Date: Tue, 09 Nov 2021 18:32:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Mohammad.

>> 2021-08-19  Mohammad-Reza Nabipoor  <mnabipoor@gnu.org>
>>      * poke/pk-mi-msg.h (pk_mi_seqnum): Replaced by `pk_mi_id`.
>>      (pk_mi_id): New typedef.
>>      (pk_mi_make_req): Add new arg (`id`).
>>      (pk_mi_make_event): Likewise.
>>      (pk_mi_make_resp): Likewise.
>>      (pk_mi_msg_number): Replaced by `pk_mi_msg_id`.
>>      (pk_mi_set_msg_number): Replaced by `pk_mi_set_msg_id`.
>>      (pk_mi_msg_resp_req_number): Replaced by `pk_mi_msg_resp_req_id`.
>>      (pk_mi_msg_id): New function declaration.
>>      (pk_mi_make_resp_auto): Likewise.
>>      (pk_mi_make_event_auto): Likewise.
>>      (pk_mi_set_msg_id): Likewise.
>>      (pk_mi_msg_resp_req_id): Likewise.

Please excuse my stubborness, but I still fail to see why we need to use
different ID namespaces for responses and events.

In the MI protocol we have requests, responses and events.

Requests are inititiated by clients.  It is the client who has to
maintain the ID namespace for requests, with just one requirement: these
IDs must be significant enough for the client to clearly handle a
reference to a given request.  poke itself must be oblivious of how
these IDs are created/organized.

Responses and events are created by poke.  The same requirements for
these IDs apply: they must be meaningful enough for poke to distinguish
between them, and also the client must be able to be oblivious on how
they are generated/organized.

So, why do we need a different namespace for responses and event IDs?

Why do we need to expand pk_mi_make_WHAT functions to get an explicit

reply via email to

[Prev in Thread] Current Thread [Next in Thread]