File: FAQ.rst

package info (click to toggle)
actor-framework 0.18.7-1~exp1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 8,740 kB
  • sloc: cpp: 85,162; sh: 491; python: 187; makefile: 11
file content (40 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.. _faq:

Frequently Asked Questions
==========================

This Section is a compilation of the most common questions via GitHub, chat,
and mailing list.

Can I Encrypt CAF Communication?
--------------------------------

Yes, by using the OpenSSL module (see :ref:`free-remoting-functions`).

Can I Create Messages Dynamically?
----------------------------------

Yes.

Usually, messages are created implicitly when sending messages but can also be
created explicitly using ``make_message``. In both cases, types and number of
elements are known at compile time. To allow for fully dynamic message
generation, CAF also offers ``message_builder``:

.. code-block:: C++

   message_builder mb;
   // prefix message with some atom
   mb.append(strings_atom::value);
   // fill message with some strings
   std::vector<std::string> strings{/*...*/};
   for (auto& str : strings)
     mb.append(str);
   // create the message
   message msg = mb.to_message();

What Debugging Tools Exist?
---------------------------

The ``scripts/`` directory contains some useful tools to aid in analyzing CAF
log output.