How to make libsoup read from an already-open stream?
- From: Trev <456 Safe-mail net>
- To: "discussion of libsoup, an HTTP library" <libsoup-list gnome org>
- Subject: How to make libsoup read from an already-open stream?
- Date: Tue, 29 May 2012 17:48:58 -0400
At a certain point in my program, I have bytes coming in on a
GPollableInputStream, and I've read enough of them into memory to
be able to know that I want to parse the stream as an HTTP response.
How can I inject the stream (and the bytes already taken from it) into
libsoup, to have it parsed as a SoupMessageBody?
I know of one way: I could set up a fake web server listening on a local
socket, and connect a SoupSession to that socket, and proxy the original
stream of incoming bytes through that fake web server to the SoupSession.
But that seems overly complicated; I hope you can suggest a better way.
Some notes that might be relevant: (1) The GPollableInputStream was
created by GSocketClient. (2) I don't need connection persistence;
I can close the socket after the SoupMessageBody is received.
Thanks,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]