[Spread-users] GROUPS_TOO_SHORT || BUFFER_TOO_SHORT

David Shaw dshaw at akamai.com
Mon Mar 18 18:37:29 EST 2002


On Mon, Mar 18, 2002 at 06:18:33PM -0500, Jonathan Stanton wrote:
> On Mon, Mar 18, 2002 at 06:09:36PM -0500, David Shaw wrote:
> > What would be really nice here would be a bit set to indicate that
> > this truncation had actually happened.  For example, an application
> > that did not care if its messages were truncated or not (but did want
> > to know if it happened) could always pass DROP_RECV.  A bit set
> > (perhaps in service_type) would indicate that the truncation was
> > necessary.  If the message did happen to fit in the buffer, then
> > DROP_RECV had no effect and the bit would not be set.
> > 
> > This allows for simpler application code and can halve the number of
> > calls into the Spread library (and halve the number of thread locks,
> > etc.).
> 
> Maybe I'm missing something in what you say, but what you want is
> exactly what happens if you pass DROP_RECV in the service field of
> every message. The message will be truncated if it is too long and
> you will be notifed by the error return code. You will only make one
> call into SP_recv for every message and if they fit it will be all
> ok, if they don't it will be truncated and you willknow you lost
> data.

Ah, that's perfect.  I did not know that there was still a
XXXX_TOO_SHORT error even if DROP_RECV was passed.

> Maybe it wasn't clear that teh return code error is returned in both
> cases.

It would be good to have DROP_RECV in the SP_receive man page ;)

David

-- 
David Shaw          |  Technical Lead
<dshaw at akamai.com>  |  Enterprise Content Delivery
617-250-3028        |  Akamai Technologies





More information about the Spread-users mailing list