josephnoir on master
Simply functor_attachable imple… Allow non-const default handlers Add compile-time checks for rec… and 1 more (compare)
josephnoir on neverlord
Neverlord on master
Add crate-ci/typos workflow Rename config file name for typ… Merge pull request #1277 (compare)
Neverlord on 1277
Add crate-ci/typos workflow Rename config file name for typ… (compare)
Neverlord on neverlord
Add compile-time checks for rec… (compare)
Neverlord on neverlord
Simply functor_attachable imple… Allow non-const default handlers Add compile-time checks for rec… (compare)
-- Building for: Visual Studio 16 2019 -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763. -- The CXX compiler identification is MSVC 19.28.29335.0
Hello guys. I'm building caf for Android and got this kind of error.
/home/alexey/.conan/data/caf/0.17.4/mypos.restart+fiscal-core/stable/build/bf600042e8b36bba73e1be4b180544c3b48c09a1/source_subfolder/libcaf_io/src/io/network/default_multiplexer.cpp:803:13: error: no matching function for call to 'getsockname' getsockname(fd, reinterpret_cast<sockaddr*>(&sa), &len)); ^~~~~~~~~~~ /home/alexey/.conan/data/caf/0.17.4/mypos.restart+fiscal-core/stable/build/bf600042e8b36bba73e1be4b180544c3b48c09a1/source_subfolder/libcaf_io/caf/detail/call_cfun.hpp:53:14: note: expanded from macro 'CALL_CFUN' auto var = expr; \ ^~~~ /opt/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/sys/socket.h:310:18: note: candidate function not viable: no known conversion from 'caf::io::network::socket_size_type *' (aka 'unsigned int *') to 'socklen_t *' (aka 'int *') for 3rd argument __socketcall int getsockname(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
Can I overcome this somehow?
using socket_size_type = unsigned;to
... = int;for Android.
remote_actoron Android anyway. Giving devices that aren't under your control full access to remote CAF nodes via CAF's internal protocol raises several security concerns.
auto timer_handle = create_timer(duration, target, args....); timer_handle.cancel()
run_delayedfeature a while back: https://github.com/actor-framework/actor-framework/issues/584#issuecomment-608627958. If that function would return a
cancellable, would that be what you're looking for?
cannot_connect_to_node: https://github.com/actor-framework/actor-framework/blob/master/libcaf_core/caf/sec.hpp#L61. If you call
to_string on the error, it should also print additional information.
In general, instead of doing error signaling manually, I'd recommend just terminating the broker with an error and monitor it from the supervisor. Whenever it sees the broker go down, you can start some reconnect logic (e.g. try reconnect every X seconds up to Y times).
caf_netin the incubator to help with this kind of scenario. So far there is an implementation for WebSocket available (examples see here: https://github.com/actor-framework/incubator/tree/master/examples/net) and some utilities for interfacing actors with network protocols (actor shell).