packio
Classes | Typedefs | Functions
packio::nlohmann_json Namespace Reference

Classes

class  rpc
 The JSON-RPC protocol implementation. More...
 

Typedefs

template<typename Socket , template< class... > class Map = default_map>
using client = ::packio::client< rpc, Socket, Map >
 The msgpack client class. More...
 
template<typename Acceptor , typename Dispatcher = dispatcher<rpc>>
using server = ::packio::server< rpc, Acceptor, Dispatcher >
 The msgpack server class. More...
 
using completion_handler = completion_handler< rpc >
 The completion_handler class. More...
 

Functions

template<typename Socket , template< class... > class Map = default_map>
auto make_client (Socket &&socket)
 Create a msgpack client from a socket. More...
 
template<typename Acceptor , typename Dispatcher = dispatcher<rpc>>
auto make_server (Acceptor &&acceptor)
 Create a msgpack server from an acceptor. More...
 

Detailed Description

The packio::nlohmann_json namespace contains the JSON-RPC implementation based on the nlohmann::json library

Typedef Documentation

◆ client

template<typename Socket , template< class... > class Map = default_map>
using packio::nlohmann_json::client = typedef ::packio::client<rpc, Socket, Map>

The msgpack client class.

Template Parameters
SocketSocket type to use for this client
MapContainer used to associate call IDs and handlers

◆ completion_handler

The completion_handler class.

First argument of AsyncProcedure, the completion_handler is a callable used to notify the completion of an asynchronous procedure. You must only call set_value or set_error once.

◆ server

template<typename Acceptor , typename Dispatcher = dispatcher<rpc>>
using packio::nlohmann_json::server = typedef ::packio::server<rpc, Acceptor, Dispatcher>

The msgpack server class.

Template Parameters
AcceptorAcceptor type to use for this server
DispatcherDispatcher used to store and dispatch procedures. See dispatcher

Function Documentation

◆ make_client()

template<typename Socket , template< class... > class Map = default_map>
auto packio::nlohmann_json::make_client ( Socket &&  socket)

Create a msgpack client from a socket.

Template Parameters
SocketSocket type to use for this client
MapContainer used to associate call IDs and handlers

◆ make_server()

template<typename Acceptor , typename Dispatcher = dispatcher<rpc>>
auto packio::nlohmann_json::make_server ( Acceptor &&  acceptor)

Create a msgpack server from an acceptor.

Template Parameters
AcceptorAcceptor type to use for this server
DispatcherDispatcher used to store and dispatch procedures. See dispatcher