xdrpp
RFC4506 XDR compiler and message library
Public Types | Public Member Functions | Public Attributes | List of all members
xdr::rpc_sock Class Reference

A wrapper around xdr::msg_sock that separates calls from replies. More...

#include <msgsock.h>

Public Types

using rcb_t = msg_sock::rcb_t
 

Public Member Functions

template<typename T >
 rpc_sock (pollset &ps, sock_t s, T &&t, size_t maxmsglen=msg_sock::default_maxmsglen)
 
 rpc_sock (pollset &ps, sock_t s)
 
template<typename T >
void set_servcb (T &&scb)
 
uint32_t get_xid ()
 
void send_call (msg_ptr &b, rcb_t cb)
 
void send_call (msg_ptr &&b, rcb_t cb)
 
void send_reply (msg_ptr &&b)
 

Public Attributes

std::unique_ptr< msg_sockms_
 
rcb_t servcb_
 

Detailed Description

A wrapper around xdr::msg_sock that separates calls from replies.

Incoming calls are forwarded to whatever callback is registered with rpc_sock::set_servcb, while replies are matched up to callbacks set with rpc_sock::send_call. Calls sent via rpc_sock::send_call should already have a unique xid generated by rpc_sock::get_xid().

Definition at line 92 of file msgsock.h.


The documentation for this class was generated from the following files: