Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4bcff71

Browse filesBrowse files
committed
Updated Document generation and requirements File
1 parent b95ec2a commit 4bcff71
Copy full SHA for 4bcff71

File tree

4 files changed

+55
-36
lines changed
Filter options

4 files changed

+55
-36
lines changed

‎doc/mkdocs.yml

Copy file name to clipboardExpand all lines: doc/mkdocs.yml
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
docs_dir: pages
22
site_name: rpclib
33

4-
pages:
4+
nav:
55
- 'Home': 'index.md'
66
- 'Guides':
77
- 'Getting started': 'gettingstarted.md'
@@ -23,6 +23,7 @@ markdown_extensions:
2323
- toc:
2424
permalink: False
2525
baselevel: 2
26+
toc_depth: 5
2627
- admonition
2728
- attr_list
2829
- codehilite

‎doc/pages/reference.md

Copy file name to clipboardExpand all lines: doc/pages/reference.md
+33-33
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Use this class to connect to msgpack-rpc servers and call their exposed function
4040
| void | [wait_all_responses](#classrpc_1_1client_1ac37437bc05b70588c079079b957eb15f)()
4141

4242

43-
<h4 id="classrpc_1_1client_1aafbcbb90607bb189bf75a2020ee14eb8" class="doxy">rpc::client::client</h4>
43+
#### rpc::client::client
4444
```cpp
4545
rpc::client::client(std::string const &addr, uint16_t port);
4646
```
@@ -56,7 +56,7 @@ Constructs a client.
5656
When a client is constructed, it initiates a connection asynchronically. This means that it will not block while the connection is established. However, when the first call is performed, it *might* block if the connection was not already established.
5757

5858

59-
<h4 id="classrpc_1_1client_1a87e0788aaa7a95dfc0e1b9c15dfe4163" class="doxy">rpc::client::~client</h4>
59+
#### rpc::client::~client
6060
```cpp
6161
rpc::client::~client();
6262
```
@@ -67,7 +67,7 @@ Destructor.
6767
During destruction, the connection to the server is gracefully closed. This means that any outstanding reads and writes are completed first.
6868

6969

70-
<h4 id="classrpc_1_1client_1aedc166b5a80820be198ef134f522b049" class="doxy">rpc::client::call</h4>
70+
#### rpc::client::call
7171
```cpp
7272
RPCLIB_MSGPACK::object_handle rpc::client::call(std::string const &func_name, Args... args);
7373
```
@@ -86,7 +86,7 @@ Calls a function with the given name and arguments (if any).
8686
A RPCLIB_MSGPACK::object containing the result of the function (if any). To obtain a typed value, use the msgpack API.
8787

8888

89-
<h4 id="classrpc_1_1client_1a2e3702a314c8c0a00bfac652b82d16cc" class="doxy">rpc::client::async_call</h4>
89+
#### rpc::client::async_call
9090
```cpp
9191
std::future< RPCLIB_MSGPACK::object_handle > rpc::client::async_call(std::string const &func_name, Args... args);
9292
```
@@ -108,7 +108,7 @@ A call is performed asynchronously in the context of the client, i.e. this is no
108108
A std::future, possibly holding a future result (which is a RPCLIB_MSGPACK::object).
109109

110110

111-
<h4 id="classrpc_1_1client_1a5f5ad1d1d0630178a51ae219cd831b44" class="doxy">rpc::client::send</h4>
111+
#### rpc::client::send
112112
```cpp
113113
void rpc::client::send(std::string const &func_name, Args... args);
114114
```
@@ -129,7 +129,7 @@ Notifications are a special kind of calls. They can be used to notify the server
129129
!!! warn
130130
This function returns immediately (possibly before the notification is written to the socket).
131131

132-
<h4 id="classrpc_1_1client_1a2c264af4d7169574452b9f968ffde87d" class="doxy">rpc::client::get_timeout</h4>
132+
#### rpc::client::get_timeout
133133
```cpp
134134
nonstd::optional< int64_t > rpc::client::get_timeout() const;
135135
```
@@ -142,31 +142,31 @@ The timeout is applied to synchronous calls. If the timeout expires without rece
142142
!!! warn
143143
The timeout has no effect on async calls. For those, the preferred timeout mechanism remains using std::future.
144144

145-
<h4 id="classrpc_1_1client_1af890e3067745861642e2ba1a65bebce6" class="doxy">rpc::client::set_timeout</h4>
145+
#### rpc::client::set_timeout
146146
```cpp
147147
void rpc::client::set_timeout(int64_t value);
148148
```
149149

150150
Sets the timeout for synchronous calls. For more information, see
151151

152152

153-
<h4 id="classrpc_1_1client_1a89eeffaf87bf0470a65c9c8ca40562bb" class="doxy">rpc::client::clear_timeout</h4>
153+
#### rpc::client::clear_timeout
154154
```cpp
155155
void rpc::client::clear_timeout();
156156
```
157157

158158
Clears the timeout for synchronous calls. For more information, see
159159

160160

161-
<h4 id="classrpc_1_1client_1a710037bce0d9b80127a98eb6cd54caf1" class="doxy">rpc::client::get_connection_state</h4>
161+
#### rpc::client::get_connection_state
162162
```cpp
163163
connection_state rpc::client::get_connection_state() const;
164164
```
165165

166166
Returns the current connection state.
167167

168168

169-
<h4 id="classrpc_1_1client_1ac37437bc05b70588c079079b957eb15f" class="doxy">rpc::client::wait_all_responses</h4>
169+
#### rpc::client::wait_all_responses
170170
```cpp
171171
void rpc::client::wait_all_responses();
172172
```
@@ -194,15 +194,15 @@ This type allows clients to handle arbitrary error objects as the msgpack-rpc sp
194194
| RPCLIB_MSGPACK::object_handle & | [get_error](#classrpc_1_1rpc__error_1a88ab8f211393ae62813042a797c08663)()
195195

196196

197-
<h4 id="classrpc_1_1rpc__error_1ac45388bcde0a436b888c907015df01e2" class="doxy">rpc::rpc_error::get_function_name</h4>
197+
#### rpc::rpc_error::get_function_name
198198
```cpp
199199
std::string rpc::rpc_error::get_function_name() const;
200200
```
201201

202202
Returns the name of the function that was called on the server while the error occurred.
203203

204204

205-
<h4 id="classrpc_1_1rpc__error_1a88ab8f211393ae62813042a797c08663" class="doxy">rpc::rpc_error::get_error</h4>
205+
#### rpc::rpc_error::get_error
206206
```cpp
207207
RPCLIB_MSGPACK::object_handle & rpc::rpc_error::get_error();
208208
```
@@ -239,7 +239,7 @@ The server maintains a registry of function bindings that it uses to dispatch ca
239239
| void | [close_sessions](#classrpc_1_1server_1abf6bebbbeea52451aef2126d29240094)()
240240

241241

242-
<h4 id="classrpc_1_1server_1ac406b44f73cf2ff17240c0cd926a9c1e" class="doxy">rpc::server::server</h4>
242+
#### rpc::server::server
243243
```cpp
244244
rpc::server::server(uint16_t port);
245245
```
@@ -250,7 +250,7 @@ Constructs a server that listens on the localhost on the specified port.
250250
`port` The port number to listen on.
251251

252252

253-
<h4 id="classrpc_1_1server_1a744b961d3b151b3449a4e0da37bd471a" class="doxy">rpc::server::server</h4>
253+
#### rpc::server::server
254254
```cpp
255255
rpc::server::server(server &&other) noexcept;
256256
```
@@ -261,7 +261,7 @@ Move constructor. This is implemented by calling the move assignment operator.
261261
`other` The other instance to move from.
262262

263263

264-
<h4 id="classrpc_1_1server_1ad71ffce076d752e116cefa3672e5d188" class="doxy">rpc::server::server</h4>
264+
#### rpc::server::server
265265
```cpp
266266
rpc::server::server(std::string const &address, uint16_t port);
267267
```
@@ -274,7 +274,7 @@ Constructs a server that listens on the specified address on the specified port.
274274
`port` The port number to listen on.
275275

276276

277-
<h4 id="classrpc_1_1server_1a20b9197e5ef1a22371e6fbdb7f58b330" class="doxy">rpc::server::~server</h4>
277+
#### rpc::server::~server
278278
```cpp
279279
rpc::server::~server();
280280
```
@@ -285,7 +285,7 @@ Destructor.
285285
When the server is destroyed, all ongoin sessions are closed gracefully.
286286

287287

288-
<h4 id="classrpc_1_1server_1ac3cf4848fc3969cd26ba5e3bd2dc411b" class="doxy">rpc::server::operator=</h4>
288+
#### rpc::server::operator=
289289
```cpp
290290
server rpc::server::operator=(server &&other);
291291
```
@@ -299,7 +299,7 @@ Move assignment operator.
299299
The result of the assignment.
300300

301301

302-
<h4 id="classrpc_1_1server_1a981d7e4a08d04d05cbac6770fab0dff8" class="doxy">rpc::server::run</h4>
302+
#### rpc::server::run
303303
```cpp
304304
void rpc::server::run();
305305
```
@@ -310,7 +310,7 @@ Starts the server loop. This is a blocking call.
310310
First and foremost, running the event loop causes the server to start listening on the specified port. Also, as connections are established and calls are made by clients, the server executes the calls as part of this call. This means that the handlers are executed on the thread that calls `run`. Reads and writes are initiated by this function internally as well.
311311

312312

313-
<h4 id="classrpc_1_1server_1a462e032fa21cad78eeacc27da103a2b7" class="doxy">rpc::server::async_run</h4>
313+
#### rpc::server::async_run
314314
```cpp
315315
void rpc::server::async_run(std::size_t worker_threads=1);
316316
```
@@ -324,7 +324,7 @@ Starts the server loop on one or more threads. This is a non-blocking call.
324324
This function behaves similarly to `run`, except the event loop is optionally started on different threads. Effectively this sets up a worker thread pool for the server. Handlers will be executed on one of the threads.
325325

326326

327-
<h4 id="classrpc_1_1server_1a072135629430df6d5576416806f7b02c" class="doxy">rpc::server::bind</h4>
327+
#### rpc::server::bind
328328
```cpp
329329
void rpc::server::bind(std::string const &name, F func);
330330
```
@@ -343,7 +343,7 @@ Binds a functor to a name so it becomes callable via RPC.
343343
This function template accepts a wide range of callables. The arguments and return types of these callables should be serializable by msgpack. `bind` effectively generates a suitable, light-weight compile-time wrapper for the functor.
344344

345345

346-
<h4 id="classrpc_1_1server_1a95d336322c9c24cf014404a3b4f70df5" class="doxy">rpc::server::suppress_exceptions</h4>
346+
#### rpc::server::suppress_exceptions
347347
```cpp
348348
void rpc::server::suppress_exceptions(bool suppress);
349349
```
@@ -353,7 +353,7 @@ Sets the exception behavior in handlers. By default, handlers throwing will cras
353353
!!! warn
354354
Setting this flag only affects subsequent connections.
355355

356-
<h4 id="classrpc_1_1server_1a7df94a496caf38b3d679113c1f62082b" class="doxy">rpc::server::stop</h4>
356+
#### rpc::server::stop
357357
```cpp
358358
void rpc::server::stop();
359359
```
@@ -363,7 +363,7 @@ Stops the server.
363363
!!! warn
364364
This should not be called from worker threads.
365365

366-
<h4 id="classrpc_1_1server_1abf6bebbbeea52451aef2126d29240094" class="doxy">rpc::server::close_sessions</h4>
366+
#### rpc::server::close_sessions
367367
```cpp
368368
void rpc::server::close_sessions();
369369
```
@@ -394,7 +394,7 @@ Encapsulates information about the currently executing handler. This is the inte
394394
| void | [clear](#classrpc_1_1this__handler__t_1a0a53e27b4d8d5b542790b218029d26f4)()
395395

396396

397-
<h4 id="classrpc_1_1this__handler__t_1a6cfb57fa89c28bd49c6ec82c42c32e87" class="doxy">rpc::this_handler_t::respond_error</h4>
397+
#### rpc::this_handler_t::respond_error
398398
```cpp
399399
void rpc::this_handler_t::respond_error(T &&err_obj);
400400
```
@@ -408,7 +408,7 @@ Sets an arbitrary object to be sent back as an error response to the client.
408408
`err_obj` The error object. This can be anything that is possible to encode with messagepack (even custom structures).
409409

410410

411-
<h4 id="classrpc_1_1this__handler__t_1ab825539a615b55772ebc1513cf2b44c7" class="doxy">rpc::this_handler_t::respond</h4>
411+
#### rpc::this_handler_t::respond
412412
```cpp
413413
void rpc::this_handler_t::respond(T &&resp_obj);
414414
```
@@ -424,7 +424,7 @@ Sets an arbitrary object to be sent back as the response to the call.
424424
!!! warn
425425
The normal return value of the function (if any) will be ignored if a special response is set.
426426

427-
<h4 id="classrpc_1_1this__handler__t_1a179997ea536a93f1b8054e0a480876a5" class="doxy">rpc::this_handler_t::disable_response</h4>
427+
#### rpc::this_handler_t::disable_response
428428
```cpp
429429
void rpc::this_handler_t::disable_response();
430430
```
@@ -434,15 +434,15 @@ Instructs the server to not send a response to the client (ignoring any errors a
434434
!!! warn
435435
It is unusual to not send a response to requests, and doing so might cause problems in the client (depending on its implementation).
436436

437-
<h4 id="classrpc_1_1this__handler__t_1aac9c17130dea7ded4bf020a370a0b9aa" class="doxy">rpc::this_handler_t::enable_response</h4>
437+
#### rpc::this_handler_t::enable_response
438438
```cpp
439439
void rpc::this_handler_t::enable_response();
440440
```
441441

442442
Enables sending a response to the call. Sending the response is by default enabled. Enabling the response multiple times have no effect.
443443

444444

445-
<h4 id="classrpc_1_1this__handler__t_1a0a53e27b4d8d5b542790b218029d26f4" class="doxy">rpc::this_handler_t::clear</h4>
445+
#### rpc::this_handler_t::clear
446446
```cpp
447447
void rpc::this_handler_t::clear();
448448
```
@@ -470,15 +470,15 @@ Allows controlling the server instance from the currently executing handler.
470470
| void | [cancel_stop](#classrpc_1_1this__server__t_1a127035c6f2281a5a1bfadf19f4dfe451)()
471471

472472

473-
<h4 id="classrpc_1_1this__server__t_1a7e522ccc489d7376e2d795f030f3890f" class="doxy">rpc::this_server_t::stop</h4>
473+
#### rpc::this_server_t::stop
474474
```cpp
475475
void rpc::this_server_t::stop();
476476
```
477477

478478
Gracefully stops the server.
479479

480480

481-
<h4 id="classrpc_1_1this__server__t_1a127035c6f2281a5a1bfadf19f4dfe451" class="doxy">rpc::this_server_t::cancel_stop</h4>
481+
#### rpc::this_server_t::cancel_stop
482482
```cpp
483483
void rpc::this_server_t::cancel_stop();
484484
```
@@ -506,7 +506,7 @@ Encapsulates information about the server session/connection this handler is run
506506
| session_id_t | [id](#classrpc_1_1this__session__t_1aada2250ec9dd3d88781ca16eb4352047)() const
507507

508508

509-
<h4 id="classrpc_1_1this__session__t_1ae0551bc44674bdd43e33a4d4a36781b0" class="doxy">rpc::this_session_t::post_exit</h4>
509+
#### rpc::this_session_t::post_exit
510510
```cpp
511511
void rpc::this_session_t::post_exit();
512512
```
@@ -516,7 +516,7 @@ Gracefully exits the session (i.e. ongoing writes and reads are completed; queue
516516
!!! warn
517517
Use this function if you need to close the connection from a handler.
518518

519-
<h4 id="classrpc_1_1this__session__t_1aada2250ec9dd3d88781ca16eb4352047" class="doxy">rpc::this_session_t::id</h4>
519+
#### rpc::this_session_t::id
520520
```cpp
521521
session_id_t rpc::this_session_t::id() const;
522522
```
@@ -545,7 +545,7 @@ This exception is thrown by the client when either the connection or a call take
545545
| const char * | [what](#classrpc_1_1timeout_1ad782f083798c650188b5927a226c3b04)() const noexcept override
546546

547547

548-
<h4 id="classrpc_1_1timeout_1ad782f083798c650188b5927a226c3b04" class="doxy">rpc::timeout::what</h4>
548+
#### rpc::timeout::what
549549
```cpp
550550
const char * rpc::timeout::what() const noexcept override;
551551
```

‎doc/reference.md.mako

Copy file name to clipboardExpand all lines: doc/reference.md.mako
+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ${"### Public functions"}
4141
4242
4343
% for f in c.functions:
44-
<h4 id="${f.id}" class="doxy">${c.name}::${f.name}</h4>
44+
${"#### "}${c.name}::${f.name}
4545
```cpp
4646
${opt(f.type)} ${c.name}::${f.name}${f.argsstr};
4747
```

‎doc/requirements.txt

Copy file name to clipboard
+19-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
lxml>=3.6.4
22
Mako>=1.0.4
3-
mkdocs
3+
mkdocs>=1.0.0
44
pygments
5+
xsltproc
6+
docker
7+
8+
9+
# Manage Docker as non-root user
10+
https://docs.docker.com/engine/install/linux-postinstall/
11+
12+
$ sudo groupadd docker
13+
$ sudo usermod -aG docker $USER
14+
15+
# log out and in to reevaluate user groups or
16+
$ newgrp docker
17+
18+
# Verify that you can run docker commands without sudo.
19+
$ docker run hello-world
20+
21+
# If mkdocs serve is used, this is required as well
22+
mkdocs-material

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.