Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
8f614cc4
Commit
8f614cc4
authored
Jul 17, 2015
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:kentonv/capnproto
parents
98b4c4f5
185f2763
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
message.h
c++/src/capnp/message.h
+2
-4
cxxrpc.md
doc/cxxrpc.md
+6
-10
No files found.
c++/src/capnp/message.h
View file @
8f614cc4
...
@@ -102,10 +102,8 @@ public:
...
@@ -102,10 +102,8 @@ public:
virtual
~
MessageReader
()
noexcept
(
false
);
virtual
~
MessageReader
()
noexcept
(
false
);
virtual
kj
::
ArrayPtr
<
const
word
>
getSegment
(
uint
id
)
=
0
;
virtual
kj
::
ArrayPtr
<
const
word
>
getSegment
(
uint
id
)
=
0
;
// Gets the segment with the given ID, or returns null if no such segment exists.
// Gets the segment with the given ID, or returns null if no such segment exists. This method
//
// will be called at most once for each segment ID.
// Normally getSegment() will only be called once for each segment ID. Subclasses can call
// reset() to clear the segment table and start over with new segments.
inline
const
ReaderOptions
&
getOptions
();
inline
const
ReaderOptions
&
getOptions
();
// Get the options passed to the constructor.
// Get the options passed to the constructor.
...
...
doc/cxxrpc.md
View file @
8f614cc4
...
@@ -352,9 +352,8 @@ int main(int argc, const char* argv[]) {
...
@@ -352,9 +352,8 @@ int main(int argc, const char* argv[]) {
capnp::EzRpcClient client(argv
[
1
]
, 5923);
capnp::EzRpcClient client(argv
[
1
]
, 5923);
auto& waitScope = client.getWaitScope();
auto& waitScope = client.getWaitScope();
// Request the service named "foo" from the server.
// Request the bootstrap capability from the server.
MyInterface::Client cap =
MyInterface::Client cap = client.getMain
<MyInterface>
();
client.importCap
<MyInterface>
("foo");
// Make a call to the capability.
// Make a call to the capability.
auto request = cap.fooRequest();
auto request = cap.fooRequest();
...
@@ -395,15 +394,12 @@ int main(int argc, const char* argv[]) {
...
@@ -395,15 +394,12 @@ int main(int argc, const char* argv[]) {
}
}
// Set up the EzRpcServer, binding to port 5923 unless a
// Set up the EzRpcServer, binding to port 5923 unless a
// different port was specified by the user.
// different port was specified by the user. Note that the
capnp::EzRpcServer server(argv
[
1
]
, 5923);
// first parameter here can be any "Client" object or anything
auto& waitScope = server.getWaitScope();
// Export a capability under the name "foo". Note that the
// second parameter here can be any "Client" object or anything
// that can implicitly cast to a "Client" object. You can even
// that can implicitly cast to a "Client" object. You can even
// re-export a capability imported from another server.
// re-export a capability imported from another server.
server.exportCap("foo", kj::heap
<MyInterfaceImpl>
());
capnp::EzRpcServer server(kj::heap
<MyInterfaceImpl>
(), argv
[
1
]
, 5923);
auto& waitScope = server.getWaitScope();
// Run forever, accepting connections and handling requests.
// Run forever, accepting connections and handling requests.
kj::NEVER_DONE.wait(waitScope);
kj::NEVER_DONE.wait(waitScope);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment