gint vortex_channel_get_next_expected_msg_no VortexChannel channel  ) 
 

Returns actual message number expected to be received on this channel.

This function must be not confused with vortex_channel_get_next_msg_no.

Explanation: Once a channel is created, both peer connected by a session where the channel is created, are expecting messages from each other and will send messages to each other.

On this context, message that peer A sends to peer B are controlled by vortex_get_next_expected_msg_no on B peer side. This means, B is expecting message 12 to arrive and this '12' will be returned by previous function.

Once a message is properly received and processed, this previous number will updated to 13. Now, when A sends to peer B a message, A needs to now what message number to use on its next message. That why vortex_channel_get_next_msg_no stands for.

This function returns actual message number to use or actual message number is waiting other peer to receive.

This explanation applies to all frame indication found on this module. As a short path to remember how this function works think as follow:

"If actual peer is going to send a message I will use vortex_channel_get_next_* functions to build up it. If I need to validate that incoming message is right I will use vortex_channel_get_next_expected_* functions."

Parameters:
channel the channel to operate on.
Returns:
expected message number to receive or -1 if fails