Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
613d6fe9
Commit
613d6fe9
authored
10 years ago
by
Nicolas "Pixel" Noble
Browse files
Options
Downloads
Patches
Plain Diff
Moving ZeroCopyOutputStream to grpc++/config.h.
parent
d446eb86
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/grpc++/config.h
+14
-0
14 additions, 0 deletions
include/grpc++/config.h
src/compiler/config.h
+0
-3
0 additions, 3 deletions
src/compiler/config.h
src/cpp/proto/proto_utils.cc
+2
-3
2 additions, 3 deletions
src/cpp/proto/proto_utils.cc
with
16 additions
and
6 deletions
include/grpc++/config.h
+
14
−
0
View file @
613d6fe9
...
@@ -52,12 +52,26 @@
...
@@ -52,12 +52,26 @@
#define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message
#define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message
#endif
#endif
#ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
#include
<google/protobuf/io/zero_copy_stream.h>
#define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ::google::protobuf::io::ZeroCopyOutputStream
#define GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ::google::protobuf::io::ZeroCopyInputStream
#endif
namespace
grpc
{
namespace
grpc
{
typedef
GRPC_CUSTOM_STRING
string
;
typedef
GRPC_CUSTOM_STRING
string
;
namespace
protobuf
{
namespace
protobuf
{
typedef
GRPC_CUSTOM_MESSAGE
Message
;
typedef
GRPC_CUSTOM_MESSAGE
Message
;
namespace
io
{
typedef
GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
ZeroCopyOutputStream
;
typedef
GRPC_CUSTOM_ZEROCOPYINPUTSTREAM
ZeroCopyInputStream
;
}
// namespace io
}
// namespace protobuf
}
// namespace protobuf
}
// namespace grpc
}
// namespace grpc
...
...
This diff is collapsed.
Click to expand it.
src/compiler/config.h
+
0
−
3
View file @
613d6fe9
...
@@ -54,12 +54,10 @@
...
@@ -54,12 +54,10 @@
#ifndef GRPC_CUSTOM_PRINTER
#ifndef GRPC_CUSTOM_PRINTER
#include
<google/protobuf/io/coded_stream.h>
#include
<google/protobuf/io/coded_stream.h>
#include
<google/protobuf/io/printer.h>
#include
<google/protobuf/io/printer.h>
#include
<google/protobuf/io/zero_copy_stream.h>
#include
<google/protobuf/io/zero_copy_stream_impl_lite.h>
#include
<google/protobuf/io/zero_copy_stream_impl_lite.h>
#define GRPC_CUSTOM_PRINTER ::google::protobuf::io::Printer
#define GRPC_CUSTOM_PRINTER ::google::protobuf::io::Printer
#define GRPC_CUSTOM_CODEDOUTPUTSTREAM ::google::protobuf::io::CodedOutputStream
#define GRPC_CUSTOM_CODEDOUTPUTSTREAM ::google::protobuf::io::CodedOutputStream
#define GRPC_CUSTOM_STRINGOUTPUTSTREAM ::google::protobuf::io::StringOutputStream
#define GRPC_CUSTOM_STRINGOUTPUTSTREAM ::google::protobuf::io::StringOutputStream
#define GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ::google::protobuf::io::ZeroCopyOutputStream
#endif
#endif
#ifndef GRPC_CUSTOM_PLUGINMAIN
#ifndef GRPC_CUSTOM_PLUGINMAIN
...
@@ -85,7 +83,6 @@ namespace io {
...
@@ -85,7 +83,6 @@ namespace io {
typedef
GRPC_CUSTOM_PRINTER
Printer
;
typedef
GRPC_CUSTOM_PRINTER
Printer
;
typedef
GRPC_CUSTOM_CODEDOUTPUTSTREAM
CodedOutputStream
;
typedef
GRPC_CUSTOM_CODEDOUTPUTSTREAM
CodedOutputStream
;
typedef
GRPC_CUSTOM_STRINGOUTPUTSTREAM
StringOutputStream
;
typedef
GRPC_CUSTOM_STRINGOUTPUTSTREAM
StringOutputStream
;
typedef
GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM
ZeroCopyOutputStream
;
}
// namespace io
}
// namespace io
}
// namespace protobuf
}
// namespace protobuf
}
// namespace grpc
}
// namespace grpc
...
...
This diff is collapsed.
Click to expand it.
src/cpp/proto/proto_utils.cc
+
2
−
3
View file @
613d6fe9
...
@@ -39,12 +39,11 @@
...
@@ -39,12 +39,11 @@
#include
<grpc/support/slice.h>
#include
<grpc/support/slice.h>
#include
<grpc/support/slice_buffer.h>
#include
<grpc/support/slice_buffer.h>
#include
<grpc/support/port_platform.h>
#include
<grpc/support/port_platform.h>
#include
<google/protobuf/io/zero_copy_stream.h>
const
int
kMaxBufferLength
=
8192
;
const
int
kMaxBufferLength
=
8192
;
class
GrpcBufferWriter
GRPC_FINAL
class
GrpcBufferWriter
GRPC_FINAL
:
public
::
g
oogle
::
protobuf
::
io
::
ZeroCopyOutputStream
{
:
public
::
g
rpc
::
protobuf
::
io
::
ZeroCopyOutputStream
{
public:
public:
explicit
GrpcBufferWriter
(
grpc_byte_buffer
**
bp
,
explicit
GrpcBufferWriter
(
grpc_byte_buffer
**
bp
,
int
block_size
=
kMaxBufferLength
)
int
block_size
=
kMaxBufferLength
)
...
@@ -97,7 +96,7 @@ class GrpcBufferWriter GRPC_FINAL
...
@@ -97,7 +96,7 @@ class GrpcBufferWriter GRPC_FINAL
};
};
class
GrpcBufferReader
GRPC_FINAL
class
GrpcBufferReader
GRPC_FINAL
:
public
::
g
oogle
::
protobuf
::
io
::
ZeroCopyInputStream
{
:
public
::
g
rpc
::
protobuf
::
io
::
ZeroCopyInputStream
{
public:
public:
explicit
GrpcBufferReader
(
grpc_byte_buffer
*
buffer
)
explicit
GrpcBufferReader
(
grpc_byte_buffer
*
buffer
)
:
byte_count_
(
0
),
backup_count_
(
0
)
{
:
byte_count_
(
0
),
backup_count_
(
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment