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.

channel The channel that is required to return next frame size.
next_seq_no This value represent the next sequence number for the first octect to be sent on the frame.
message_size This value represent the size of the payload to be sent.
max_seq_no Is the maximum allowed seqno accepted by the remote peer. Beyond this value, the remote peer will close the connection.
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.