PollingRPCBackend
template<class ServiceType, typename RequestType, typename ResponseType>class PollingRPCBackend : public RPCBackend<ServiceType, RequestType, ResponseType>, public IPollingBackendInterface<RequestType>Template Parameters
class ServiceTypetypename RequestTypetypename ResponseType
Dependencies: IPollingBackendInterface, PollingRPCWorker, RPCBackend
Inherits from: public RPCBackend<ServiceType, RequestType, ResponseType>, public IPollingBackendInterface<RequestType>
Public Interface
Constructor:
PollingRPCBackend
inline PollingRPCBackend(RPCBackend::AsyncRPCHandle TargetRPC, std::shared_ptr<ServiceType> Service, std::unique_ptr<ServerCompletionQueue> CQueue)Parameters:
| Name | Type | Default |
|---|---|---|
TargetRPC | RPCBackend::AsyncRPCHandle | “ |
Service | std::shared_ptr<ServiceType> | “ |
CQueue | std::unique_ptr<ServerCompletionQueue> | “ |
Attributes: inline
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 127, column 1)
Destructor:
~PollingRPCBackend
inline ~PollingRPCBackend()Attributes: inline
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 133, column 1)
Public Functions:
Poll
inline virtual TOptional<const RequestType *> Poll() overridePoll the Backend for a message from the client.
Returns: An Empty optional if No messages have been received, a fulfilled one otherwise
Note: This function should be non-blocking
Returns: TOptional<const RequestType *>
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 139, column 11)
Initialize
inline virtual void Initialize()Perform any setup that happens prior to establishing any external connection.
this could include opening a socket and waiting for a connection.
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 154, column 14)
Start
inline virtual void Start() overrideAttributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 156, column 14)
Establish
inline virtual void Establish()Perform any setup that involves handshakes with the external communication (e.g.
setting up serialization). Use after Initialize.
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 161, column 14)
Shutdown
inline virtual void Shutdown() overrideClose the external connection.
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 163, column 14)
Restart
inline virtual void Restart()Reset the Communication backend.
Attributes: inline, virtual
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 168, column 14)
Private Interface
Private Members:
PollingRPCWorker<ServiceType, RequestType, ResponseType> * Worker
PollingRPCWorker<ServiceType, RequestType, ResponseType> * WorkerAttributes: private
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 123, column 18)
Source: Schola/Source/Schola/Public/Communicator/PollingRPCBackend.h (line 119, column 1)