Giter VIP home page Giter VIP logo

urdl's People

Contributors

chriskohlhoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urdl's Issues

support any http options

http options is implemented as number of classes. Is there any reason not to use a k/v based container ?
If I want to add more options, I HAVE to change the source code. That makes urdl less adaptable to regular uses.

Question: should I check for read errors after urdl::stream::rdbuf()

It's not clear to me how to correctly handle errors when using the following idiom:

std::ofstream os(path, std::ios_base::out | std::ios_base::binary);
            
if (!os)
{
       throw std::runtime_error(...);
}   
            
os << is.rdbuf();
is.close();
os.close();

Should I for example check after os << is.rdbuf() using something like:

if (!is)
{
         throw std::runtime_error(is.error().message());
}

Visual Studio can't find "liburdl-gd.lib"

I use urdl and the latest boost library (1.61.0).
I builded both exactly as it is mentioned in their documentations.
Also I have put the directories for the include path and the libary path in the options.
When I try to debug my application it says that the above mentioned library could not opend (LNK1104 Code)

Also I noticed, that in the lib folder of my urdl folder are no librarys.

Does anyone know whats wrong with my urdl folder? I used bjam to build it and also the right BOOST_ROOT.

Btw: I'm programming and compiling with visual studio 15

Windows internal compile error with URDL and Boost 1.57

I'm trying to use URDL from the latest version on Windows in conjunction with Boost 1.57.

When I compile using Visual Studio 2013 I get the following errors...

1>c:\urdl-0.1\include\urdl\detail\file_read_stream.hpp(98): warning C4244: '=' : conversion from 'std::streamsize' to 'size_t', possible loss of data 1> c:\urdl-0.1\include\urdl\detail\file_read_stream.hpp(113) : see reference to function template instantiation 'size_t urdl::detail::file_read_stream::read_some(const MutableBufferSequence &,boost::system::error_code &)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> ] 1> c:\urdl-0.1\include\urdl\read_stream.hpp(673) : see reference to function template instantiation 'void urdl::detail::file_read_stream::async_read_some(const MutableBufferSequence &,Handler)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> , Handler=real_handler_type 1> ] 1> c:\urdl-0.1\include\urdl\impl\istreambuf.ipp(201) : see reference to function template instantiation 'boost::asio::async_result::type urdl::read_stream::async_read_someboost::asio::mutable_buffers_1,urdl::detail::istreambuf_read_handler(const MutableBufferSequence &,Handler)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_read_handler 1> , MutableBufferSequence=boost::asio::mutable_buffers_1 1> ] 1>c:\urdl-0.1\include\urdl\detail\http_read_stream.hpp(451): warning C4244: '+=' : conversion from 'std::streamsize' to 'size_t', possible loss of data 1> c:\urdl-0.1\include\urdl\detail\http_read_stream.hpp(522) : see reference to function template instantiation 'size_t urdl::detail::http_read_streamboost::asio::ip::tcp::socket::read_some(const MutableBufferSequence &,boost::system::error_code &)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> ] 1> c:\urdl-0.1\include\urdl\detail\http_read_stream.hpp(522) : see reference to function template instantiation 'size_t urdl::detail::http_read_streamboost::asio::ip::tcp::socket::read_some(const MutableBufferSequence &,boost::system::error_code &)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> ] 1> c:\urdl-0.1\include\urdl\read_stream.hpp(676) : see reference to function template instantiation 'void urdl::detail::http_read_streamboost::asio::ip::tcp::socket::async_read_some(const MutableBufferSequence &,Handler)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> , Handler=real_handler_type 1> ] 1> c:\urdl-0.1\include\urdl\read_stream.hpp(676) : see reference to function template instantiation 'void urdl::detail::http_read_streamboost::asio::ip::tcp::socket::async_read_some(const MutableBufferSequence &,Handler)' being compiled 1> with 1> [ 1> MutableBufferSequence=boost::asio::mutable_buffers_1 1> , Handler=real_handler_type 1> ] 1>c:\boost_1_57_0\boost\asio\detail\handler_invoke_helpers.hpp(37): fatal error C1001: An internal error has occurred in the compiler. 1> (compiler file 'msc1.cpp', line 1325) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1> Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information 1> c:\boost_1_57_0\boost\asio\detail\wait_handler.hpp(70) : see reference to function template instantiation 'void boost_asio_handler_invoke_helpers::invokeboost::asio::detail::binder1(Function &,Context &)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> , Function=boost::asio::detail::binder1urdl::detail::istreambuf_timeout_handler,boost::system::error_code 1> , Context=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\detail\wait_handler.hpp(47) : while compiling class template member function 'void boost::asio::detail::wait_handler::do_complete(boost::asio::detail::io_service_impl *,boost::asio::detail::operation *,const boost::system::error_code &,size_t)' 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\detail\wait_handler.hpp(41) : see reference to function template instantiation 'void boost::asio::detail::wait_handler::do_complete(boost::asio::detail::io_service_impl *,boost::asio::detail::operation *,const boost::system::error_code &,size_t)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\detail\deadline_timer_service.hpp(183) : see reference to class template instantiation 'boost::asio::detail::wait_handler' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\deadline_timer_service.hpp(149) : see reference to function template instantiation 'void boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::async_waiturdl::detail::istreambuf_timeout_handler(boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::implementation_type &,Handler &)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\deadline_timer_service.hpp(149) : see reference to function template instantiation 'void boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::async_waiturdl::detail::istreambuf_timeout_handler(boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::implementation_type &,Handler &)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> ] 1> c:\boost_1_57_0\boost\asio\basic_deadline_timer.hpp(508) : see reference to function template instantiation 'boost::asio::async_result::type boost::asio::deadline_timer_service::async_waiturdl::detail::istreambuf_timeout_handler&(boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::implementation_type &,WaitHandler)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> , Time=boost::posix_time::ptime 1> , TimeTraits=boost::asio::time_traitsboost::posix_time::ptime 1> , WaitHandler=urdl::detail::istreambuf_timeout_handler & 1> ] 1> c:\boost_1_57_0\boost\asio\basic_deadline_timer.hpp(508) : see reference to function template instantiation 'boost::asio::async_result::type boost::asio::deadline_timer_service::async_waiturdl::detail::istreambuf_timeout_handler&(boost::asio::detail::deadline_timer_serviceboost::asio::time_traits::implementation_type &,WaitHandler)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> , Time=boost::posix_time::ptime 1> , TimeTraits=boost::asio::time_traitsboost::posix_time::ptime 1> , WaitHandler=urdl::detail::istreambuf_timeout_handler & 1> ] 1> c:\urdl-0.1\include\urdl\impl\istreambuf.ipp(126) : see reference to function template instantiation 'boost::asio::async_result::type boost::asio::basic_deadline_timerboost::posix_time::ptime,boost::asio::time_traits>::async_waiturdl::detail::istreambuf_timeout_handler&(WaitHandler)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> , Time=boost::posix_time::ptime 1> , TimeTraits=boost::asio::time_traitsboost::posix_time::ptime 1> , WaitHandler=urdl::detail::istreambuf_timeout_handler & 1> ] 1> c:\urdl-0.1\include\urdl\impl\istreambuf.ipp(126) : see reference to function template instantiation 'boost::asio::async_result::type boost::asio::basic_deadline_timerboost::posix_time::ptime,boost::asio::time_traits>::async_waiturdl::detail::istreambuf_timeout_handler&(WaitHandler)' being compiled 1> with 1> [ 1> Handler=urdl::detail::istreambuf_timeout_handler 1> , Time=boost::posix_time::ptime 1> , TimeTraits=boost::asio::time_traitsboost::posix_time::ptime 1> , WaitHandler=urdl::detail::istreambuf_timeout_handler & 1> ] 1> INTERNAL COMPILER ERROR in 'C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\CL.exe' 1> Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information

Can't compile urdl.cpp

clang++ -I./include -I${BOOST_ROOT}/include -c src/urdl.cpp

Error:

In file included from src/urdl.cpp:8:
In file included from ./include/urdl/impl/istreambuf.ipp:15:
In file included from .../include/boost/asio/io_service.hpp:24:
In file included from .../include/boost/asio/detail/wrapped_handler.hpp:18:
In file included from .../include/boost/asio/detail/bind_handler.hpp:21:
.../include/boost/asio/detail/handler_invoke_helpers.hpp:37:3: error: call to 'asio_handler_invoke' is
      ambiguous
  asio_handler_invoke(function, boost::asio::detail::addressof(context));
  ^~~~~~~~~~~~~~~~~~~

Full error log: http://pastebin.com/RTxfkJvE
boost 1.55

Asio Standalone

Sorry to ask here but are there any plans to connect this to Asio Standalone?

need help to build urdl in win19/64bit-pro

hello chriskohlhoff - URDL lib
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

in windows 10/64bit/pro:

i defined BOOST_ROOT environment variable pointing to the location of Boost. C:\boost_1_64_0_GCC
i set an OPENSSL_ROOT environment variable pointing to the location of OpenSSL. C:\openssl-1.1.0e

(i can see it with set command)

i use bjam "toolset=gcc" in: C:\urdl-master
output:

Performing configuration checks

- 32-bit                   : no
- 64-bit                   : yes
- arm                      : no
- mips1                    : no
- power                    : no
- sparc                    : no
- x86                      : yes
- symlinks supported       : no
- junctions supported      : yes
- hardlinks supported      : yes

error: Unable to find file or target named
error: '/urdl//C:\openssl-1.1.0e/out32dll/libeay32.lib'
error: referred to from project at
error: 'build'

what do i have to do to make it build in windows 10/64bit/pro?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.