| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
scripts/build.sh), simple lint fixes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
header is complete (or an error occured, i.e. past header streaming stage)
`url_header_sync` allows user to wait until the url streamed header is completed, either
- Final (http) CRLF message received
- Any http header error response received
- First data package received
- End of operation
This way content_size can be awaited and acted accordingly at read,
e.g. a blocking read w/ content_size.
|
|
|
|
| |
and all specializations, refine single byte API
|
|
|
|
|
|
| |
- Add ByteOutStream interface
- Add ByteOutStream_File implementation similar to ByteInStream_File, based on POSIX fd etc.
- Add is_open() to ByteInStream and ByteOutStream interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build scripts
- setup-machine-arch.sh
- set os_name { 'linux' or 'freebsd' }
- skip syslibdir for non linux
- be quite if given arg "-quiet"
- Set JAVA_HOME (if not done yet)
- Set JUNIT_CP (if not done yet)
- adopted all build/test scripts
C++ compilation:
- drop libatomic on all non Linux OS
- Set SYS_INCLUDE_DIRS w/ FreeBSD += /usr/local/include, use it in compilation
- FreeBSD: Set CMAKE_SYSTEM_PREFIX_PATH={/usr;/usr/local}
- Use find_library() for LIBCURL_LIBNAME and LIBUNWIND_LIBNAME w/ REQUIRED if selected
- Test: ownership_fix_tag: Use group 44(video) as defined in FreeBSD, Debian and Ubuntu
- use 'chgrp -f' to not complain on errors, continue build
OS/C++ file locations:
- mini_httpd
Java file locations:
- openjdk
- junit4 + hamcrest
- IOUtil.getExeTestShellCode(): FreeBSD uses /bin/test as /bin/true is n/a (for executable temp jar dir, i.e. fat jars)
|
|
|
|
| |
instead of `#ifdef USE_LIBCURL`; Fix test package for TestByteStream01 and fix Clock.cxx name
|
|
|
|
| |
''org.jau.nio.UriTk'; C++: 'jau::io::uri' -> 'jau::io::uri_tk'
|
|
|
|
| |
(-DUSE_LIBCURL=ON or not)
|
| |
|
|
|
|
| |
dependencies w/o using it
|
|
|
|
| |
system(const char*)’, declared with attribute warn_unused_result [-Werror=unused-result]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sourced as file or via remote URL
* `string_util.hpp`: Add `jau::to_string()` support for `std::string` and `std::string_view` as well as for `std::vector<T>` lists
* Add namespace `jau::io::uri`, limited URI scheme functionality to query whether implementation may handle the protocol.
- Query *libcurl* supported protocols at runtime
- Test for local file protocol
- Test whether protocol in given uri is supported by *libcurl*
* `jau::io::read_url_stream()`, sync and async, return immediately if protocol in given url is not supportet
- async variant returns `std::unique_ptr<std::thread>`, where a nullptr is used for no support
* `jau::io::ByteInStream_File` recognizes the local file protocol and cuts off `file://` is used.
- Fix: Recognition of a non-existing path, unaccessbile path or non-file case properly
* `jau::io::ByteInStream_URL` recognizes a non supported protocol via async `jau::io::read_url_stream()`.
* Added convenient `jau::io::std::unique_ptr<ByteInStream> to_ByteInStream()`
- Returning either a `jau::io::ByteInStream_File`, `jau::io::ByteInStream_URL` or nullptr if `path_or_url` is not supported
* Make Java class `org.jau.ney.Uri` standalone, drop dependencies for easier reusage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
w/ response_code for errors >= 400 and buffer.interruptReader()
- curl replies -1 for unknown content_length
- also consume the curl header to detect response_code errors >= 400 (404 not found)
- in case of an error, we need to interrupt the ringbuffer-reader thread -> buffer.interruptReader(),
otherwise the thread would be blocked until timeout and renders application to not be responsive.
- interruptReader() has been added for the synchronous- and asynchronous read_url_stream() functions
- interruptReader() has been exposed as ByteInStream_Feed::interruptReader()
and added to ByteInStream_Feed::set_eof().
- the above is tested via test_iostream01 for synchronous- and asynchronous read_url_stream() functions
using a non-existing URL entity
- the above is tested via test_bytestream01 for ByteInStream_URL using a non-existing URL entity
and for and ByteInStream_Feed having the feeder thread prematurely end transmission.
|
|
|
|
| |
all methods noexcept, see Botan related notes; Add test_bytestream01 unit tests.
|
| |
|
| |
|
|
project for better encapsulation, test and generic use
Fixed: ByteStream_File::check_available(): 'm_bytes_consumed - m_content_size >= n',
missed subtracting m_content_size (duh)
test_iostream01 uses the fragile std::system() call to start/stop mini_httpd as the http server for testing
streaming with curl.
|