Re: FW: Libsoup patches // Performance metrics



En 09/04/13 15:05, Pieter Ennes escribiu:
Hi Sergio,

En 09/04/13 13:37, Ennes, Pieter escribiu:
Hi,

Linked to below are two old patches to libsoup-2.30 that I'd like to discuss for enhancement:

1) https://bitbucket.org/watchmouse/libsoup/commits/0e514092bb9733f4c548aa65ec13cca24f240b98

A SoupMessage 'got-raw-chunk' event, analogous to the existing 'got-chunk', but emitted just before the 
chunk body is decoded. It allows the client to inspect the content as it goes over the wire, which we use 
to get an accurate measure of the number of bytes received, but I can imagine it could serve different 
purposes. Or I can imagine there are easier ways to obtain the same information.

The current trend in libsoup is to use the stream infrastructure instead
of the SoupMessage signals. One example of using the network raw data is
the SoupCache that caches it on disk.

Sounds promising; will research how it's done there, thanks.

You can take a look at the code for further details but I guess you just
need to define a new SoupContentProcessor with the proper
SoupProcessingState (SOUP_STATE_ENTITY_BODY is what you're looking for I
guess) and add it to the session. You can then use it to read raw data
from network by just adding a input stream to the stack of streams in
your implementation of wrap_input()

BR



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