Re: HTTP library



Currently libghttp only downloads to a memory buffer (at least, I haven't
seen any use where it hasn't done this, and can't see how to do it from
the source).

It would probably be useful to have a simple streaming interface where you
could pass in a structure something like:
  typedef struct _ghttp_stream ghttp_stream;
  struct _ghttp_stream {
    void (*write_data)(char *data, int len, void *user_data);
    int (*read_data)(char *buffer, int len, void *user_data);
    void (*close)(void *user_data);
    void *user_data;
  }

And then have libghttp use these functions for reading/writing the data
rather than a memory buffer.  A few default implementations would be
useful to provide.  The obvious ones are a memory buffer interface and a
file interface.  Then for streaming purposes, you could write a custom
ghttp_stream structure.

Something like this would probably be a good idea to implement in the
library.

James.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Wed, 23 Jun 1999, Andrey Zmievski wrote:

> Hello,
> 
> I'm starting work on an application which will require HTTP transactions.
> I see that there is an HTTP library in gnome CVS, but I'm wondering if it's
> robust enough to allow for full HTTP protocol including downloading
> streaming data.  If not, is there a library that would do what I need?
> 
> Thanks,
> 
> 
> -Andrey
> 
> 
> -- 
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
> 



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