ProducerRPCBackend
template<class ServiceType, typename RequestType, typename ResponseType>class ProducerRPCBackend : public RPCBackend<ServiceType, RequestType, ResponseType>, public IProducerBackendInterface<ResponseType>模板参数
class ServiceTypetypename RequestTypetypename ResponseType
依赖项: IProducerBackendInterface, ProducerRPCWorker, RPCBackend
继承自: public RPCBackend<ServiceType, RequestType, ResponseType>, public IProducerBackendInterface<ResponseType>
公共接口
构造函数
ProducerRPCBackend
inline ProducerRPCBackend(RPCBackend::AsyncRPCHandle TargetRPC, std::shared_ptr<ServiceType> Service, std::unique_ptr<ServerCompletionQueue> CQueue)参数
| 名称 | 类型 | 默认 |
|---|---|---|
TargetRPC | RPCBackend::AsyncRPCHandle | “ |
Service | std::shared_ptr<ServiceType> | “ |
CQueue | std::unique_ptr<ServerCompletionQueue> | “ |
属性: inline
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 132 行,第 1 列)
析构函数
~ProducerRPCBackend
inline ~ProducerRPCBackend()属性: inline
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 139 行,第 1 列)
公共函数
SendProtobufMessage
inline virtual void SendProtobufMessage(ResponseType *Response) override向客户端发送消息。
参数
Msg(ResponseType *)– [in] 要发送给客户端的消息
属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 146 行,第 6 列)
Initialize
inline virtual void Initialize()执行任何发生在建立任何外部连接之前的设置。
这可能包括打开套接字并等待连接。
属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 156 行,第 14 列)
Start
inline virtual void Start()属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 158 行,第 14 列)
Establish
inline virtual void Establish()执行涉及与外部通信进行握手的任何设置(例如。
设置序列化)。在 Initialize 之后使用。
属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 163 行,第 14 列)
关闭
inline virtual void Shutdown() override关闭外部连接。
属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 165 行,第 14 列)
Restart
inline virtual void Restart()重置通信后端。
属性: inline, virtual
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 170 行,第 14 列)
私有接口
私有成员
int LocalID
int LocalID = = 0属性: private
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 124 行,第 5 列)
int MsgID
int MsgID = = 0属性: private
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 125 行,第 5 列)
ProducerRPCWorker<ServiceType, RequestType, ResponseType> * Worker
ProducerRPCWorker<ServiceType, RequestType, ResponseType> * Worker属性: private
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 128 行,第 19 列)
源文件: Schola/Source/Schola/Public/Communicator/ProducerRPCBackend.h (第 121 行,第 1 列)