int vortex_channel_get_next_frame_size ( VortexChannel channel,
unsigned int  next_seq_no,
int  message_size,
unsigned int  max_seq_no 
)

Gets the amount of data to be copied from the pending message into the frame about being fragmented or built.

The function is used by the vortex sequencer to get the amount of data to get from the message.

If the channel do not have any VortexChannelFrameSize defined at vortex_channel_set_next_frame_size_handler the function will use the default implementation provided.

Parameters
channelThe channel that is required to return next frame size.
next_seq_noThis value represent the next sequence number for the first octect to be sent on the frame.
message_sizeThis value represent the size of the payload to be sent.
max_seq_noIs the maximum allowed seqno accepted by the remote peer. Beyond this value, the remote peer will close the connection.
Returns
The amount of payload to use into the next frame to be built. The function will return -1 if the channel reference received is NULL.

References MAX_SEQ_NO, vortex_channel_get_ctx(), vortex_connection_get_next_frame_size(), and VORTEX_MIN.