Hi Klement, Thanks for your reply!
The exact problem statement is , we are trying to send some events from VPP to client app , but client is not able to read those events api messages until it has some pending requests. So as a work-around we are sending control ping after few seconds from client to have at least one request pending from client side. Thanks, Chetan Bhasin On Fri, Aug 17, 2018 at 4:26 PM, Klement Sekera <ksek...@cisco.com> wrote: > 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: vpp-dev+ow...@lists.fd.io > > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [ksek...@cisco.com] > > -=-=-=-=-=-=-=-=-=-=-=- >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10199): https://lists.fd.io/g/vpp-dev/message/10199 Mute This Topic: https://lists.fd.io/mt/24611122/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-