NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
async_compose.hpp
浏览该文件的文档.
1#ifndef NEFORCE_CORE_ASYNC_ASYNC_COMPOSE_HPP__
2#define NEFORCE_CORE_ASYNC_ASYNC_COMPOSE_HPP__
3
10
15NEFORCE_BEGIN_NAMESPACE__
16
22
32void async_read(async_stream& stream, io_context& ctx, vector<char>& buffer,
33 function<void(error_code, size_t)> handler);
34
45void async_write(async_stream& stream, io_context& ctx, const void* data, size_t size,
46 function<void(error_code, size_t)> handler);
47 // AsyncCompose
49
50NEFORCE_END_NAMESPACE__
51#endif // NEFORCE_CORE_ASYNC_ASYNC_COMPOSE_HPP__
异步流抽象基类
异步流抽象基类
函数包装器主模板声明
统一异步操作核心
动态大小数组容器
通用函数包装器
void async_read(async_stream &stream, io_context &ctx, vector< char > &buffer, function< void(error_code, size_t)> handler)
异步读取指定字节数
void async_write(async_stream &stream, io_context &ctx, const void *data, size_t size, function< void(error_code, size_t)> handler)
异步写入指定字节数
constexpr decltype(auto) size(const Container &cont) noexcept(noexcept(cont.size()))
获取容器的大小
constexpr decltype(auto) data(Container &cont) noexcept(noexcept(cont.data()))
获取容器的底层数据指针
动态大小数组容器