QAbstractGrpcChannel Class
The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality. More...
Header: | #include <QAbstractGrpcChannel> |
Inherited By: |
Public Functions
virtual QGrpcStatus | call(QLatin1StringView method, QLatin1StringView service, QByteArrayView args, QByteArray &ret, const QGrpcCallOptions &options = QGrpcCallOptions()) = 0 |
int | call(QLatin1StringView method, QLatin1StringView service, QByteArrayView args, const QGrpcCallOptions &options = QGrpcCallOptions()) |
int | serializer() const |
int | startStream(QLatin1StringView method, QLatin1StringView service, QByteArrayView arg, const QGrpcCallOptions &options = QGrpcCallOptions()) |
Detailed Description
\inmodule
QtGrpc
You may implement this interface to create your own channels for gRPC transport. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.
Member Function Documentation
[pure virtual]
QGrpcStatus QAbstractGrpcChannel::call(QLatin1StringView method, QLatin1StringView service, QByteArrayView args, QByteArray &ret, const QGrpcCallOptions &options = QGrpcCallOptions())
This pure virtual function synchronously calls the RPC method concatenated from the method and service parameters with the given args and writes the result to the output parameter ret. Uses options argument to set additional parameter for the call.
You may reimplement this function in a subclass to define your own call mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.
int QAbstractGrpcChannel::call(QLatin1StringView method, QLatin1StringView service, QByteArrayView args, const QGrpcCallOptions &options = QGrpcCallOptions())
This pure virtual function asynchronously calls the RPC method combined with the method and service parameters with the given args and returns an asynchronous response in the form of QGrpcCallReply. Uses options argument to set additional parameter for the call.
You may reimplement this function in a subclass to define your own call mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.
int QAbstractGrpcChannel::serializer() const
This pure virtual function shall return a shared pointer to QAbstractProtobufSerializer.
This function is called to obtain the QAbstractProtobufSerializer used to perform serialization and deserialization of the message.
int QAbstractGrpcChannel::startStream(QLatin1StringView method, QLatin1StringView service, QByteArrayView arg, const QGrpcCallOptions &options = QGrpcCallOptions())
This pure virtual function creates and starts a stream to the RPC method.
The RPC method name is constructed by concatenating the method and service parameters and called with the arg argument. Returns a shared pointer to the QGrpcStream. Uses options argument to set additional parameter for the stream.
You may reimplement this function in a subclass to define your own stream mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.