axl_bool vortex_channel_is_ready ( VortexChannel channel)

Returns the actual state for a given channel about pending replies to be received (not pending replies to be sent).

Due to RFC3080/RFC3081 design any message sent must be replied in the same order the message was issued. This means that if you use the same channel to send two messages the reply for the second one will not be received until the previous one is. This is axl_true even the second message have a task-impact lower than previous on the remote peer.

Of course this is a bottleneck problem because you can increase greatly the message/reply processing relation using channels that are ready in the sense they are not waiting for message replies so your message will not be blocked due to previous ones.

This function returns if a channel is ready in the previous sense: "No previous message is waiting to be replied over this channel so my message will only wait as long as the remote peer process my message and reply it".

In other words: "The function returns axl_true if the channel received all replies for all message sent".

Keep in mind a channel is always ready to accept new message to be sent messages. In fact, eventually any message sent over a channel will have its reply but this "ready sense" is a matter of performance not availability.

NOTE 1:The function do not check if the channel have pending replies to be sent. This is the opossite situation where the remote peer sent messages that this channel didn't reply.

This function only cares about channel's pending replies to be received, not those to be sent.

NOTE 2:As a general rule any MSG received, by both peers, must be replied by a RPY or ERR or ANS/NUL series.

channelthe channel to check for its readyness state.
axl_true if ready, otherwise axl_false is returned.

References vortex_mutex_lock(), and vortex_mutex_unlock().

Referenced by vortex_xml_rpc_invoke().