Opened 10 years ago
Closed 9 years ago
#7859 closed Bugs (invalid)
should ssl/engine get_output return const buffer ?
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
compiling the attached testasiossl.cpp program, you get an error message complaining that it is not possible to convert 'mutable_buffers_1' to 'const_buffers_1' in a call to async_write_some, called from write_op. ( see the attached files for the full compiler output )
The reason write_op tries to pass a mutable buffer instead of a const buffer, is that it obtains the buffer by calling 'get_output'. which returns a mutable buffer. ( in boost/asio/ssl/detail/impl/engine.ipp )
shouldn't get_output return a const buffer sequence?
note that in the test program i explicitly defined the types for the buffers, instead of making them a templated argument.
Attachments (4)
Change History (5)
by , 10 years ago
Attachment: | testasiossl.cpp added |
---|
comment:1 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
By explicitly specifying the buffer types your teststream class does not adhere to the stream type requirements. It should accept an arbitrary ConstBufferSequence (for async_write_some) or MutableBufferSequence (for async_read_some).
program showing problem with ssl/engine get_output