[Vortex] BUG(?): Increasing channel window size breaks connection

Jens Alfke jens at mooseyard.com
Sun Apr 20 19:56:56 CEST 2008


On 18 Apr '08, at 5:09 PM, Jens Alfke wrote:

> I've been trying larger values for channel->window_size, by changing  
> the initial values in vortex_channel_empty_new( ).

Now that I've read more about how windows work (thanks to Francis's  
helpful article at beepcore.org) I see that this was the wrong way to  
do it. The window size of a new channel is implicitly 4096, so for one  
peer to start with a different value will confuse the other. Instead,  
the window size has to be changed by sending a SEQ frame to notify the  
other peer.

I'm adding a vortex_channel_set_window_size function. In doing so, I  
noticed that the documentation for the existing getter function seems  
to be incorrect:

> /**
>  * @brief Returns actual channel window size.
>  *
>  * Maximum window size accepted by remote peer. This is the number of
>  * bytes that the remote peer is willing to accept until a new SEQ
>  * frame is set.
>  *
>  * @param channel the channel to operate on.
>  *
>  * @return the window size or -1 if fails
>  */
> int             vortex_channel_get_window_size (VortexChannel *  
> channel)

The implementation of window_size shows that it's used as the maximum  
number of bytes that the _local_ peer will accept, not the remote  
peer. Also, the value is the _current_ window size, not the maximum (I  
don't think there is a maximum, other than INT_MAX.)

I suggest changing the description to:

>  * Current window size used for receiving data on this channel. This  
> is the number of
>  * bytes that the local peer is willing to accept at once, before  
> sending a new SEQ
>  * frame.

I'll submit a proposed patch for the new API call once I've finished  
testing it; probably by tomorrow morning (California time).

—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aspl.es/pipermail/vortex/attachments/20080420/b0e1727c/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20080420/b0e1727c/attachment.bin 


More information about the Vortex mailing list