C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

reading a stream coming from a http source

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
om
Guest





PostPosted: Sun Nov 20, 2005 5:05 pm    Post subject: reading a stream coming from a http source Reply with quote



I am new to c++ can anyone advice me how to read a stream coming from a
http source thanks.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Ben Hutchings
Guest





PostPosted: Sat Dec 03, 2005 11:32 am    Post subject: Re: reading a stream coming from a http source Reply with quote



om <shaikhm3 (AT) cs (DOT) man.ac.uk> wrote:
Quote:
I am new to c++ can anyone advice me how to read a stream coming from a
http source thanks.

There is no networking support in the C++ standard library. It is not
too difficult to define a streambuf that works with sockets, which
could then be used for HTTP; I was able to do so with about 50 lines
of code and the aid of a few socket wrapper functions. However, it
does require some knowledge of the socket API(s) and is probably not a
sensible task for a beginner. There are probably existing class
libraries that provide streams like this, though.

--
Ben Hutchings
Having problems with C++ templates? Your questions may be answered by
<http://womble.decadentplace.org.uk/c++/template-faq.html>.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Maciej Sobczak
Guest





PostPosted: Mon Dec 05, 2005 12:28 pm    Post subject: Re: reading a stream coming from a http source Reply with quote



Ben Hutchings wrote:

Quote:
There is no networking support in the C++ standard library. It is not
too difficult to define a streambuf that works with sockets, which
could then be used for HTTP; I was able to do so with about 50 lines
of code and the aid of a few socket wrapper functions. However, it
does require some knowledge of the socket API(s) and is probably not a
sensible task for a beginner. There are probably existing class
libraries that provide streams like this, though.

A lot of, actually.

For starters, you may wish to try this:

http://www.msobczak.com/prog/bin/sockets.zip

It is a basic and simple implementation of the TCP stream within the
IOStreams framework.


--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.