aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/create_channel.h1
-rw-r--r--include/grpc++/impl/codegen/client_context.h2
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h37
-rw-r--r--include/grpc/grpc.h3
4 files changed, 34 insertions, 9 deletions
diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h
index e9ccb51503..0537695ed2 100644
--- a/include/grpc++/create_channel.h
+++ b/include/grpc++/create_channel.h
@@ -48,7 +48,6 @@ namespace grpc {
/// \param target The URI of the endpoint to connect to.
/// \param creds Credentials to use for the created channel. If it does not hold
/// an object or is invalid, a lame channel is returned.
-/// \param args Options for channel creation.
std::shared_ptr<Channel> CreateChannel(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds);
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index 3467ab14c2..247d14d124 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -269,7 +269,7 @@ class ClientContext {
/// Set \a algorithm to be the compression algorithm used for the client call.
///
- /// \param algorith The compression algorithm used for the client call.
+ /// \param algorithm The compression algorithm used for the client call.
void set_compression_algorithm(grpc_compression_algorithm algorithm);
/// Return the peer uri in a string.
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index e0556237f6..c064ac6f63 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -63,6 +63,15 @@ class ClientStreamingInterface {
virtual Status Finish() = 0;
};
+/// Common interface for all synchronous server side streaming.
+class ServerStreamingInterface {
+ public:
+ virtual ~ServerStreamingInterface() {}
+
+ /// Blocking send initial metadata to client.
+ virtual void SendInitialMetadata() = 0;
+};
+
/// An interface that yields a sequence of messages of type \a R.
template <class R>
class ReaderInterface {
@@ -335,12 +344,17 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
Call call_;
};
+/// Server-side interface for streaming reads of message of type \a R.
+template <class R>
+class ServerReaderInterface : public ServerStreamingInterface,
+ public ReaderInterface<R> {};
+
template <class R>
-class ServerReader GRPC_FINAL : public ReaderInterface<R> {
+class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
public:
ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() {
+ void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -366,12 +380,17 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
ServerContext* const ctx_;
};
+/// Server-side interface for streaming writes of message of type \a W.
template <class W>
-class ServerWriter GRPC_FINAL : public WriterInterface<W> {
+class ServerWriterInterface : public ServerStreamingInterface,
+ public WriterInterface<W> {};
+
+template <class W>
+class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
public:
ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() {
+ void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -410,12 +429,16 @@ class ServerWriter GRPC_FINAL : public WriterInterface<W> {
/// Server-side interface for bi-directional streaming.
template <class W, class R>
-class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
- public ReaderInterface<R> {
+class ServerReaderWriterInterface : public ServerStreamingInterface,
+ public WriterInterface<W>,
+ public ReaderInterface<R> {};
+
+template <class W, class R>
+class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
public:
ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() {
+ void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 4ca018edb3..587d86c98f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -90,6 +90,9 @@ GRPCAPI void grpc_shutdown(void);
/** Return a string representing the current version of grpc */
GRPCAPI const char *grpc_version_string(void);
+/** Return a string specifying what the 'g' in gRPC stands for */
+GRPCAPI const char *grpc_g_stands_for(void);
+
/** Create a completion queue */
GRPCAPI grpc_completion_queue *grpc_completion_queue_create(void *reserved);