mirror of
https://github.com/jezhiggins/arabica
synced 2025-02-05 20:45:56 +01:00
Moved socket_stream.hpp into io directory
Moved socketstream into Arabica::io namespace
This commit is contained in:
parent
2ef3dffa7d
commit
6c8549e923
2 changed files with 5 additions and 2 deletions
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
namespace Arabica
|
namespace Arabica
|
||||||
{
|
{
|
||||||
|
namespace io
|
||||||
|
{
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// basic_socketbuf declaration
|
// basic_socketbuf declaration
|
||||||
|
@ -429,6 +431,7 @@ typedef basic_socketbuf<wchar_t, std::char_traits<wchar_t> > wsocketbuf;
|
||||||
typedef basic_socketstream<wchar_t, std::char_traits<wchar_t> > wsocketstream;
|
typedef basic_socketstream<wchar_t, std::char_traits<wchar_t> > wsocketstream;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
} // namespace io
|
||||||
} // namespace Arabica
|
} // namespace Arabica
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -9,7 +9,7 @@
|
||||||
#include <SAX/helpers/InputSourceResolver.hpp>
|
#include <SAX/helpers/InputSourceResolver.hpp>
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <Utils/socket_stream.hpp>
|
#include <io/socket_stream.hpp>
|
||||||
#include <io/uri.hpp>
|
#include <io/uri.hpp>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ namespace
|
||||||
|
|
||||||
Arabica::io::URI url(httpURI);
|
Arabica::io::URI url(httpURI);
|
||||||
|
|
||||||
Arabica::socketstream* ifs = new Arabica::socketstream(url.host().c_str(), std::atoi(url.port().c_str()));
|
Arabica::io::socketstream* ifs = new Arabica::io::socketstream(url.host().c_str(), std::atoi(url.port().c_str()));
|
||||||
if(!ifs->is_open())
|
if(!ifs->is_open())
|
||||||
return 0;
|
return 0;
|
||||||
*ifs << "GET " << url.path() << " HTTP/1.0" << std::endl;
|
*ifs << "GET " << url.path() << " HTTP/1.0" << std::endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue