What exactly is the issue? According to vapi_dispatch() docstring this
is expected:

/**
 * @brief loop vapi_dispatch_one until responses to all currently
outstanding
 * requests have been received and their callbacks called
 *
 * @note the dispatch loop is interrupted if any error is encountered
or
 * returned from the callback, in which case this error is returned as
the
 * result of vapi_dispatch. In this case it might be necessary to call
dispatch
 * again to process the remaining messages. Returning VAPI_EUSER from
 * a callback allows the user to break the dispatch loop (and
distinguish
 * this case in the calling code from other failures). VAPI never
returns
 * VAPI_EUSER on its own.
 *
 * @return VAPI_OK on success, other error code on error
 */
  vapi_error_e vapi_dispatch (vapi_ctx_t ctx);

What are you trying to achieve?

Thanks,
Klement


On Fri, 2018-08-17 at 15:52 +0530, chetan bhasin wrote:
> Hi,
> 
> We are facing an issue during usage of API framework.
> 
> We have open a Non-blocking connection from Client app.
> 
> If Client does not have any pending request then it skip reading the
> responses in vapi_dispatch . Please suggest
> 
> vapi_error_e
> vapi_dispatch (vapi_ctx_t ctx)
> {
>   vapi_error_e rv = VAPI_OK;
> *  while (!vapi_requests_empty (ctx))*
>     {
>       rv = vapi_dispatch_one (ctx);
>       if (VAPI_OK != rv)
>     {
>       return rv;
>     }
>     }
>   return rv;
> }
> 
> 
> Thanks,
> Chetan Bhasin
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10196): https://lists.fd.io/g/vpp-dev/message/101
> 96
> Mute This Topic: https://lists.fd.io/mt/24611122/675704
> Group Owner: [email protected]
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10197): https://lists.fd.io/g/vpp-dev/message/10197
Mute This Topic: https://lists.fd.io/mt/24611122/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to