All Projects → timniederhausen → asio-extensions

timniederhausen / asio-extensions

Licence: BSL-1.0 License
Additional functionality built on top of (Boost.)Asio

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Labels

Projects that are alternatives of or similar to asio-extensions

texugo
🦡 Fast, flexible, multiplatform, lightweight and, dependency-free message gateway
Stars: ✭ 18 (+12.5%)
Mutual labels:  boost, asio
mtxclient
Client API library for Matrix, built on top of Boost.Asio
Stars: ✭ 21 (+31.25%)
Mutual labels:  boost, asio
Cpp Rotor
Event loop friendly C++ actor micro-framework
Stars: ✭ 111 (+593.75%)
Mutual labels:  boost, asio
boost beast websocket echo
A collection of Demo applications to try to help you understand how Asio and Beast work
Stars: ✭ 12 (-25%)
Mutual labels:  boost, asio
Autobahn Cpp
WAMP for C++ in Boost/Asio
Stars: ✭ 231 (+1343.75%)
Mutual labels:  boost, asio
Beast
HTTP and WebSocket built on Boost.Asio in C++11
Stars: ✭ 3,241 (+20156.25%)
Mutual labels:  boost, asio
Boost Asio Study
Examples and toturials for C++ Boost Asio library.
Stars: ✭ 144 (+800%)
Mutual labels:  boost, asio
Cpp Bredis
Boost::ASIO low-level redis client (connector)
Stars: ✭ 117 (+631.25%)
Mutual labels:  boost, asio
Beasthttp
Provides helper tools for creating RESTful services using Boost.Beast
Stars: ✭ 227 (+1318.75%)
Mutual labels:  boost, asio
Asio samples
Examples (code samples) describing the construction of active objects on the top of Boost.Asio. A code-based guide for client/server creation with usage of active object pattern by means of Boost C++ Libraries.
Stars: ✭ 191 (+1093.75%)
Mutual labels:  boost, asio
Webcc
Lightweight C++ HTTP client and server library based on Asio for embedding purpose.
Stars: ✭ 167 (+943.75%)
Mutual labels:  boost, asio
boost-wintls
Native Windows TLS stream wrapper for use with boost::asio
Stars: ✭ 24 (+50%)
Mutual labels:  boost, asio
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (+37.5%)
Mutual labels:  boost, asio
ufw
A minimalist framework for rapid server side applications prototyping in C++ with dependency injection support.
Stars: ✭ 19 (+18.75%)
Mutual labels:  boost, asio
crypto3
Modern Cryptography Suite in C++17
Stars: ✭ 21 (+31.25%)
Mutual labels:  boost
Open-Infra-Platform
This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Stars: ✭ 26 (+62.5%)
Mutual labels:  boost
zork
Full C++-17 port of the 616-point version of Zork from MIT circa 1978-1981
Stars: ✭ 16 (+0%)
Mutual labels:  boost
asio-grpc
Asynchronous gRPC with Asio/unified executors
Stars: ✭ 100 (+525%)
Mutual labels:  asio
XPS9570-8570H-macos
9570 mac完善&&超频指南
Stars: ✭ 21 (+31.25%)
Mutual labels:  boost
SpecIde
Let's try something with SFML.
Stars: ✭ 27 (+68.75%)
Mutual labels:  boost

Asio Extensions (AsioExt)

Build Status Build status

AsioExt is a collection of various components and functionality that builds on (Boost.)Asio. It is compatible with standalone Asio, as well as the Boost version.

Feature overview

Filesystem:

  • File handle types with support for:
    • Asio's *Stream concepts (SyncReadStream, SyncRandomAccessReadDevice, ...)
    • Querying/altering file metadata (size, permissions, attributes, file times)
  • Asynchronous file I/O with different implementations.
  • Utility functions for writing/reading files.

Networking:

  • SOCKS 5 client library
  • Utilities for common operations (e.g. resolve and connect)

This is a very coarse overview of the project's features. The documentation has all the details.

Simple example

#include <asioext/unique_file_handle.hpp>
#include <asioext/read_file.hpp>
#include <asioext/write_file.hpp>
#include <asioext/open.hpp>

#include <asio/read.hpp>

#include <iostream>
#include <cassert>

int main(int argc, const char* argv[])
{
  const std::string test_content("Hello world");

  try {
    // Utility functions write/read containers and buffer sequences to/from files.
    const std::array<asio::const_buffer, 2> buffers_to_write = {
      asio::buffer(test_content),
      asio::buffer(test_content),
    };
    asioext::write_file("myfile.txt", buffers_to_write);

    std::string read_content;
    asioext::read_file("myfile.txt", read_content);

    assert(read_content == test_content + test_content);

    // (unique_)file_handle simply wraps a native file handle.
    // (There's also basic_file, which needs an asio::io_service and provides
    // asynchronous I/O.)
    asioext::unique_file_handle file =
        asioext::open("myfile.txt", asioext::open_flags::access_read |
                                    asioext::open_flags::open_existing);

    assert(file.size() == test_content.size() * 2);

    std::string read_content2(test_content.size(), '\0');
    asio::read(file, asio::buffer(&read_content2[0], read_content2.size()));

    assert(read_content2 == test_content);
    return 0;
  } catch (std::exception& e) {
    // Exceptions are used for error reporting here.
    // All functions also offer a non-throwing overload,
    // which takes an asio::error_code& instead.
    std::cerr << "error: " << e.what() << std::endl;
    return 1;
  }
}

Take a look at the examples directory for more!

Documentation

The documentation can be found at http://timniederhausen.github.io/asio-extensions, or inside the gh-pages branch.

Additionally, the documentation can be generated by building the special asioext.doc target. Note that this target is only available if you have Doxygen installed.

License

Please see LICENSE_1_0.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].