Re: [gnet] http api question



On Wednesday 13 April 2005 14:49, David Sowa wrote:

> Thanks for the feedback, if you make any changes to this
> stuff I'll give it a go.

Should be fixed in GNet CVS.

> It seems to me that once you get into that callback function and
> have the pointer to the data and the length you would want to
> do one of two things depending on the context.  In my case I'm
> just looking to write it to disk so I really just want to use
> that pointer and the tell the library I'm done with it and it
> can be released.  In a different context you would probably want
> to take control of the buffer and tell the library that you
> will free that pointer later when you are done with it.
>
> Actually now that I think about it both of these cases are just
> subcases of just getting ownership of the pointer.  So if you can
> do that safely without leaking and without a buffer copy all
> would be well.

I've changed gnet_conn_http_steal_buffer() to do that now.

Cheers
 -Tim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]