Funapi RPC interface.
|
|
typedef boost::function< void(const Ptr< FunRpcMessage > &)> ReadyBack | ASSERT_NO_ROLLBACK |
| | Functor to signal that a RPC server finished processing.
|
| |
|
typedef boost::function< void(const PeerId &, const Xid &, const Ptr< const FunRpcMessage > &)> | Callback |
| | Functor to be invoked when a RPC client receives back a reply.
|
| |
|
typedef boost::function< void(const PeerId &)> | ConnectHandler |
| | Functor to be invoked when a new server connected.
|
| |
|
typedef boost::function< void(const PeerId &)> | DisconnectHandler |
| | Functor to be invoked when a server disconnected.
|
| |
|
typedef boost::function< void(const PeerId &, const Xid &, const Ptr< const FunRpcMessage > &, const ReadyBack &)> | Handler |
| | Functor to be invoked when a RPC server receives RPC messages.
|
| |
|
typedef boost::asio::ip::tcp::endpoint | PeerEndpoint |
| |
|
typedef Uuid | PeerId |
| |
|
typedef std::map< PeerId, PeerEndpoint > | PeerMap |
| |
|
typedef Uuid | SerializationTag |
| |
|
typedef string | Tag |
| |
|
typedef std::set< Tag > | Tags |
| |
|
typedef boost::function< void(const PeerId &, const Xid &, const Ptr< const FunRpcMessage > &)> | VoidReplyHandler |
| |
|
typedef Uuid | Xid |
| |
|
| static void | AddTag (const Tag &tag) |
| | Tags a local RPC server. More...
|
| |
| static void | AddTags (const Tags &tags) |
| | Tags a local RPC server. More...
|
| |
| static void | Call (const PeerId &peer, const Ptr< FunRpcMessage > &msg, const Callback &callback, const SerializationTag &tag=kDefaultSerializationTag) ASSERT_NO_ROLLBACK |
| | Sends a RPC requst to the given RPC server. More...
|
| |
| static void | Call (const PeerId &peer, const Ptr< FunRpcMessage > &msg, const SerializationTag &tag=kDefaultSerializationTag) ASSERT_NO_ROLLBACK |
| | Sends a RPC requst to the given RPC server. More...
|
| |
| static std::string | GetPeerExternalHostname (const PeerId &peer) |
| | Returns a hostname of the peer. More...
|
| |
| static boost::asio::ip::address | GetPeerExternalIp (const PeerId &peer) |
| | Returns a public IP of the peer. More...
|
| |
| static HardwareInfo::ProtocolPortMap | GetPeerExternalPorts (const PeerId &peer) |
| | Returns a public ports of the peer. More...
|
| |
| static size_t | GetPeers (PeerMap *ret, bool include_self=false) |
| | Returns information on other RPC peers. More...
|
| |
| static Json | GetPeerStatus (const PeerId &peer) |
| | Returns a status of the peer. More...
|
| |
| static size_t | GetPeersWithTag (PeerMap *ret, const Tag &tag, bool include_self=false) |
| | Returns a list of RPC peers with the given tag. More...
|
| |
| static size_t | GetPeerTags (Tags *ret, const PeerId &peer) |
| | Returns a set of tags associated with the given peer. More...
|
| |
| static PeerEndpoint | GetSelfEndpoint () |
| | Returns an endpoint information to which RPC listens. More...
|
| |
| static PeerId | GetSelfId () |
| | Returns an identifier to distinguish from RPC servers. More...
|
| |
|
static Json | GetStatus () |
| | Gets the server status.
|
| |
| static bool | HasTag (const Tag &tag) |
| | Checks if a local RPC server has the tag. More...
|
| |
| static bool | IsExternalPeer (const PeerId &peer) |
| | Checks if the peer is from external. More...
|
| |
| static bool | IsPeerConnected (const PeerId &peer) |
| | Checks if the peer is connected. More...
|
| |
|
static void | RegisterConnectHandler (const ConnectHandler &h) |
| | Registers a handler for notifying a new server connection.
|
| |
|
static void | RegisterDisconnectHandler (const DisconnectHandler &h) |
| | Registers a handler for notifying a server disconnection.
|
| |
| static void | RegisterHandler (const string &type, const Handler &h) |
| | Registers a handler for a particular RPC message type. More...
|
| |
| static void | RegisterVoidReplyHandler (const string &type, const VoidReplyHandler &h) |
| | Registers a handler for a particular RPC message type. More...
|
| |
| static void | RemoveTag (const Tag &tag) |
| | Untags a local RPC server. More...
|
| |
| static void | RemoveTags (const Tags &tags) |
| | Untags a local RPC server. More...
|
| |
| static void | SetStatus (const Json &status) |
| | Sets the server status and broadcasts using RPC. More...
|
| |