aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-10-13 09:39:05 -0700
committerGravatar Vijay Pai <vpai@google.com>2016-10-13 09:39:05 -0700
commit22fcbf966324724e5a9224b073de5efd5fcf471f (patch)
tree3130dfe7b61ddd01493d152feeb1c3b82be32ac9 /include
parentdb5b1cbc9483b78458ca529df5603bb15c982d63 (diff)
parentd44144c3b2112ed61a21c08331bfe9e18664ceb3 (diff)
Merge branch 'master' into fc_1dstream
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/create_channel_posix.h10
-rw-r--r--include/grpc++/ext/reflection.grpc.pb.h2
-rw-r--r--include/grpc++/ext/reflection.pb.h134
-rw-r--r--include/grpc++/impl/codegen/client_context.h20
-rw-r--r--include/grpc++/server.h3
-rw-r--r--include/grpc/grpc_posix.h13
-rw-r--r--include/grpc/impl/codegen/grpc_types.h26
7 files changed, 149 insertions, 59 deletions
diff --git a/include/grpc++/create_channel_posix.h b/include/grpc++/create_channel_posix.h
index 0d96159942..2af12e6c36 100644
--- a/include/grpc++/create_channel_posix.h
+++ b/include/grpc++/create_channel_posix.h
@@ -37,6 +37,7 @@
#include <memory>
#include <grpc++/channel.h>
+#include <grpc++/support/channel_arguments.h>
#include <grpc/support/port_platform.h>
namespace grpc {
@@ -50,6 +51,15 @@ namespace grpc {
std::shared_ptr<Channel> CreateInsecureChannelFromFd(const grpc::string& target,
int fd);
+/// Create a new \a Channel communicating over given file descriptor with custom
+/// channel arguments
+///
+/// \param target The name of the target.
+/// \param fd The file descriptor representing a socket.
+/// \param args Options for channel creation.
+std::shared_ptr<Channel> CreateCustomInsecureChannelFromFd(
+ const grpc::string& target, int fd, const ChannelArguments& args);
+
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
} // namespace grpc
diff --git a/include/grpc++/ext/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h
index 064117e303..6e56088497 100644
--- a/include/grpc++/ext/reflection.grpc.pb.h
+++ b/include/grpc++/ext/reflection.grpc.pb.h
@@ -32,7 +32,7 @@
*/
-// Generated by the gRPC protobuf plugin.
+// Generated by tools/codegen/extensions/gen_reflection_proto.sh
// If you make any local change, they will be lost.
// source: reflection.proto
// Original file comments:
diff --git a/include/grpc++/ext/reflection.pb.h b/include/grpc++/ext/reflection.pb.h
index bdb86197d0..6e645af10e 100644
--- a/include/grpc++/ext/reflection.pb.h
+++ b/include/grpc++/ext/reflection.pb.h
@@ -32,7 +32,7 @@
*/
-// Generated by the protocol buffer compiler. DO NOT EDIT!
+// Generated by tools/codegen/extensions/gen_reflection_proto.sh
// source: reflection.proto
#ifndef PROTOBUF_reflection_2eproto__INCLUDED
@@ -42,12 +42,12 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 3000000
+#if GOOGLE_PROTOBUF_VERSION < 3001000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -69,6 +69,7 @@ namespace v1alpha {
// Internal implementation detail -- do not call these.
void protobuf_AddDesc_reflection_2eproto();
+void protobuf_InitDefaults_reflection_2eproto();
void protobuf_AssignDesc_reflection_2eproto();
void protobuf_ShutdownFile_reflection_2eproto();
@@ -107,6 +108,8 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
MESSAGE_REQUEST_NOT_SET = 0,
};
+ static const ServerReflectionRequest* internal_default_instance();
+
void Swap(ServerReflectionRequest* other);
// implements Message ----------------------------------------------
@@ -121,7 +124,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -137,6 +140,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ServerReflectionRequest* other);
+ void UnsafeMergeFrom(const ServerReflectionRequest& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -242,7 +246,6 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
inline void clear_has_message_request();
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr host_;
union MessageRequestUnion {
MessageRequestUnion() {}
@@ -255,13 +258,15 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i
mutable int _cached_size_;
::google::protobuf::uint32 _oneof_case_[1];
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ServerReflectionRequest* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_;
+
// -------------------------------------------------------------------
class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ {
@@ -279,6 +284,8 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
static const ::google::protobuf::Descriptor* descriptor();
static const ExtensionRequest& default_instance();
+ static const ExtensionRequest* internal_default_instance();
+
void Swap(ExtensionRequest* other);
// implements Message ----------------------------------------------
@@ -293,7 +300,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -309,6 +316,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ExtensionRequest* other);
+ void UnsafeMergeFrom(const ExtensionRequest& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -345,17 +353,18 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr containing_type_;
::google::protobuf::int32 extension_number_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ExtensionRequest* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_;
+
// -------------------------------------------------------------------
class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ {
@@ -381,6 +390,8 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
MESSAGE_RESPONSE_NOT_SET = 0,
};
+ static const ServerReflectionResponse* internal_default_instance();
+
void Swap(ServerReflectionResponse* other);
// implements Message ----------------------------------------------
@@ -395,7 +406,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -411,6 +422,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ServerReflectionResponse* other);
+ void UnsafeMergeFrom(const ServerReflectionResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -495,7 +507,6 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
inline void clear_has_message_response();
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr valid_host_;
::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_;
union MessageResponseUnion {
@@ -508,13 +519,15 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_
mutable int _cached_size_;
::google::protobuf::uint32 _oneof_case_[1];
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ServerReflectionResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_;
+
// -------------------------------------------------------------------
class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ {
@@ -532,6 +545,8 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
static const ::google::protobuf::Descriptor* descriptor();
static const FileDescriptorResponse& default_instance();
+ static const FileDescriptorResponse* internal_default_instance();
+
void Swap(FileDescriptorResponse* other);
// implements Message ----------------------------------------------
@@ -546,7 +561,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -562,6 +577,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(FileDescriptorResponse* other);
+ void UnsafeMergeFrom(const FileDescriptorResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -597,16 +613,17 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static FileDescriptorResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_;
+
// -------------------------------------------------------------------
class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ {
@@ -624,6 +641,8 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
static const ::google::protobuf::Descriptor* descriptor();
static const ExtensionNumberResponse& default_instance();
+ static const ExtensionNumberResponse* internal_default_instance();
+
void Swap(ExtensionNumberResponse* other);
// implements Message ----------------------------------------------
@@ -638,7 +657,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -654,6 +673,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ExtensionNumberResponse* other);
+ void UnsafeMergeFrom(const ExtensionNumberResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -696,18 +716,19 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
- ::google::protobuf::internal::ArenaStringPtr base_type_name_;
::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_;
mutable int _extension_number_cached_byte_size_;
+ ::google::protobuf::internal::ArenaStringPtr base_type_name_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ExtensionNumberResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_;
+
// -------------------------------------------------------------------
class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ {
@@ -725,6 +746,8 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
static const ::google::protobuf::Descriptor* descriptor();
static const ListServiceResponse& default_instance();
+ static const ListServiceResponse* internal_default_instance();
+
void Swap(ListServiceResponse* other);
// implements Message ----------------------------------------------
@@ -739,7 +762,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -755,6 +778,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ListServiceResponse* other);
+ void UnsafeMergeFrom(const ListServiceResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -786,16 +810,17 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ListServiceResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_;
+
// -------------------------------------------------------------------
class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ {
@@ -813,6 +838,8 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
static const ::google::protobuf::Descriptor* descriptor();
static const ServiceResponse& default_instance();
+ static const ServiceResponse* internal_default_instance();
+
void Swap(ServiceResponse* other);
// implements Message ----------------------------------------------
@@ -827,7 +854,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -843,6 +870,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ServiceResponse* other);
+ void UnsafeMergeFrom(const ServiceResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -873,16 +901,17 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr name_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ServiceResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_;
+
// -------------------------------------------------------------------
class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ {
@@ -900,6 +929,8 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
static const ::google::protobuf::Descriptor* descriptor();
static const ErrorResponse& default_instance();
+ static const ErrorResponse* internal_default_instance();
+
void Swap(ErrorResponse* other);
// implements Message ----------------------------------------------
@@ -914,7 +945,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
void Clear();
bool IsInitialized() const;
- int ByteSize() const;
+ size_t ByteSizeLong() const;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
@@ -930,6 +961,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
void SharedDtor();
void SetCachedSize(int size) const;
void InternalSwap(ErrorResponse* other);
+ void UnsafeMergeFrom(const ErrorResponse& from);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return _internal_metadata_.arena();
@@ -966,17 +998,18 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- bool _is_default_instance_;
::google::protobuf::internal::ArenaStringPtr error_message_;
::google::protobuf::int32 error_code_;
mutable int _cached_size_;
- friend void protobuf_AddDesc_reflection_2eproto();
+ friend void protobuf_InitDefaults_reflection_2eproto_impl();
+ friend void protobuf_AddDesc_reflection_2eproto_impl();
friend void protobuf_AssignDesc_reflection_2eproto();
friend void protobuf_ShutdownFile_reflection_2eproto();
void InitAsDefaultInstance();
- static ErrorResponse* default_instance_;
};
+extern ::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_;
+
// ===================================================================
@@ -1410,6 +1443,9 @@ inline void ServerReflectionRequest::clear_has_message_request() {
inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const {
return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]);
}
+inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() {
+ return &ServerReflectionRequest_default_instance_.get();
+}
// -------------------------------------------------------------------
// ExtensionRequest
@@ -1472,6 +1508,9 @@ inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 val
// @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
}
+inline const ExtensionRequest* ExtensionRequest::internal_default_instance() {
+ return &ExtensionRequest_default_instance_.get();
+}
// -------------------------------------------------------------------
// ServerReflectionResponse
@@ -1522,7 +1561,7 @@ inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* va
// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
inline bool ServerReflectionResponse::has_original_request() const {
- return !_is_default_instance_ && original_request_ != NULL;
+ return this != internal_default_instance() && original_request_ != NULL;
}
inline void ServerReflectionResponse::clear_original_request() {
if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
@@ -1530,7 +1569,8 @@ inline void ServerReflectionResponse::clear_original_request() {
}
inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const {
// @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_;
+ return original_request_ != NULL ? *original_request_
+ : *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance();
}
inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() {
@@ -1759,6 +1799,9 @@ inline void ServerReflectionResponse::clear_has_message_response() {
inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const {
return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]);
}
+inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() {
+ return &ServerReflectionResponse_default_instance_.get();
+}
// -------------------------------------------------------------------
// FileDescriptorResponse
@@ -1818,6 +1861,9 @@ FileDescriptorResponse::mutable_file_descriptor_proto() {
return &file_descriptor_proto_;
}
+inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() {
+ return &FileDescriptorResponse_default_instance_.get();
+}
// -------------------------------------------------------------------
// ExtensionNumberResponse
@@ -1896,6 +1942,9 @@ ExtensionNumberResponse::mutable_extension_number() {
return &extension_number_;
}
+inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() {
+ return &ExtensionNumberResponse_default_instance_.get();
+}
// -------------------------------------------------------------------
// ListServiceResponse
@@ -1930,6 +1979,9 @@ ListServiceResponse::service() const {
return service_;
}
+inline const ListServiceResponse* ListServiceResponse::internal_default_instance() {
+ return &ListServiceResponse_default_instance_.get();
+}
// -------------------------------------------------------------------
// ServiceResponse
@@ -1978,6 +2030,9 @@ inline void ServiceResponse::set_allocated_name(::std::string* name) {
// @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name)
}
+inline const ServiceResponse* ServiceResponse::internal_default_instance() {
+ return &ServiceResponse_default_instance_.get();
+}
// -------------------------------------------------------------------
// ErrorResponse
@@ -2040,6 +2095,9 @@ inline void ErrorResponse::set_allocated_error_message(::std::string* error_mess
// @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message)
}
+inline const ErrorResponse* ErrorResponse::internal_default_instance() {
+ return &ErrorResponse_default_instance_.get();
+}
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
// -------------------------------------------------------------------
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index 387d807c4b..a330ed06bb 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -226,8 +226,14 @@ class ClientContext {
/// EXPERIMENTAL: Set this request to be cacheable
void set_cacheable(bool cacheable) { cacheable_ = cacheable; }
- /// EXPERIMENTAL: Trigger fail-fast or not on this request
- void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; }
+ /// EXPERIMENTAL: Trigger wait-for-ready or not on this request
+ void set_wait_for_ready(bool wait_for_ready) {
+ wait_for_ready_ = wait_for_ready;
+ wait_for_ready_explicitly_set_ = true;
+ }
+
+ /// DEPRECATED: Use set_wait_for_ready() instead.
+ void set_fail_fast(bool fail_fast) { set_wait_for_ready(!fail_fast); }
#ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call.
@@ -347,14 +353,18 @@ class ClientContext {
uint32_t initial_metadata_flags() const {
return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) |
- (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) |
- (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0);
+ (wait_for_ready_ ? GRPC_INITIAL_METADATA_WAIT_FOR_READY : 0) |
+ (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0) |
+ (wait_for_ready_explicitly_set_
+ ? GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET
+ : 0);
}
grpc::string authority() { return authority_; }
bool initial_metadata_received_;
- bool fail_fast_;
+ bool wait_for_ready_;
+ bool wait_for_ready_explicitly_set_;
bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_;
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index 6e15035125..f51a6c658f 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -96,9 +96,6 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
// Returns a \em raw pointer to the underlying grpc_server instance.
grpc_server* c_server();
- // Returns a \em raw pointer to the underlying CompletionQueue.
- CompletionQueue* completion_queue();
-
private:
friend class AsyncGenericService;
friend class ServerBuilder;
diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h
index 5e89ae3b1e..a8c031548b 100644
--- a/include/grpc/grpc_posix.h
+++ b/include/grpc/grpc_posix.h
@@ -57,14 +57,17 @@ GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd(
/** Add the connected communication channel based on file descriptor 'fd' to the
'server'. The 'fd' must be an open file descriptor corresponding to a
- connected socket. The 'cq' is a completion queue that will be getting events
- from that descriptor. */
+ connected socket. Events from the file descriptor may come on any of the
+ server completion queues (i.e completion queues registered via the
+ grpc_server_register_completion_queue API).
+
+ The 'reserved' pointer MUST be NULL.
+ */
GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server,
- grpc_completion_queue *cq,
- int fd);
+ void *reserved, int fd);
/** GRPC Core POSIX library may internally use signals to optimize some work.
- The library uses (SIGRTMIN + 2) signal by default. Use this API to instruct
+ The library uses (SIGRTMIN + 6) signal by default. Use this API to instruct
the library to use a different signal i.e 'signum' instead.
Note:
- To prevent GRPC library from using any signals, pass a 'signum' of -1
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index a8e8ebe6ea..ebeef038d1 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -148,11 +148,13 @@ typedef struct {
/** Maximum number of concurrent incoming streams to allow on a http2
connection. Int valued. */
#define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
-/** Maximum message length that the channel can receive. Int valued, bytes. */
+/** Maximum message length that the channel can receive. Int valued, bytes.
+ -1 means unlimited. */
#define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
/** \deprecated For backward compatibility. */
#define GRPC_ARG_MAX_MESSAGE_LENGTH GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
-/** Maximum message length that the channel can send. Int valued, bytes. */
+/** Maximum message length that the channel can send. Int valued, bytes.
+ -1 means unlimited. */
#define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
/** Initial sequence number for http2 transports. Int valued. */
#define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
@@ -184,6 +186,9 @@ typedef struct {
#define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
/** The maximum time between subsequent connection attempts, in ms */
#define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
+/** The time between the first and second connection attempts, in ms */
+#define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
+ "grpc.initial_reconnect_backoff_ms"
/* The caller of the secure_channel_create functions may override the target
name used for SSL host name checking using this channel argument which is of
type \a GRPC_ARG_STRING. This *should* be used for testing only.
@@ -252,15 +257,22 @@ typedef enum grpc_call_error {
/** Signal that the call is idempotent */
#define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
/** Signal that the call should not return UNAVAILABLE before it has started */
-#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY (0x00000020u)
+#define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u)
+/** DEPRECATED: for backward compatibility */
+#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY \
+ GRPC_INITIAL_METADATA_WAIT_FOR_READY
/** Signal that the call is cacheable. GRPC is free to use GET verb */
#define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u)
+/** Signal that GRPC_INITIAL_METADATA_WAIT_FOR_READY was explicitly set
+ by the calling application. */
+#define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u)
/** Mask of all valid flags */
-#define GRPC_INITIAL_METADATA_USED_MASK \
- (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
- GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY | \
- GRPC_INITIAL_METADATA_CACHEABLE_REQUEST)
+#define GRPC_INITIAL_METADATA_USED_MASK \
+ (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
+ GRPC_INITIAL_METADATA_WAIT_FOR_READY | \
+ GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \
+ GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET)
/** A single metadata element */
typedef struct grpc_metadata {