Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
01b171f3
Commit
01b171f3
authored
Apr 16, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently use a less-verbose commenting style
parent
7f922342
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
228 additions
and
304 deletions
+228
-304
examples/dynamic_behavior/dining_philosophers.cpp
examples/dynamic_behavior/dining_philosophers.cpp
+2
-4
examples/message_passing/calculator.cpp
examples/message_passing/calculator.cpp
+2
-4
examples/message_passing/cell.cpp
examples/message_passing/cell.cpp
+2
-4
examples/message_passing/dancing_kirby.cpp
examples/message_passing/dancing_kirby.cpp
+1
-3
examples/message_passing/divider.cpp
examples/message_passing/divider.cpp
+1
-3
examples/message_passing/request.cpp
examples/message_passing/request.cpp
+1
-3
examples/message_passing/typed_calculator.cpp
examples/message_passing/typed_calculator.cpp
+2
-4
examples/qtsupport/qt_group_chat.cpp
examples/qtsupport/qt_group_chat.cpp
+8
-10
examples/remoting/distributed_calculator.cpp
examples/remoting/distributed_calculator.cpp
+10
-12
libcaf_core/caf/abstract_actor.hpp
libcaf_core/caf/abstract_actor.hpp
+1
-3
libcaf_core/caf/all.hpp
libcaf_core/caf/all.hpp
+27
-0
libcaf_core/caf/caf_main.hpp
libcaf_core/caf/caf_main.hpp
+3
-17
libcaf_core/caf/detail/private_thread_pool.hpp
libcaf_core/caf/detail/private_thread_pool.hpp
+3
-17
libcaf_core/caf/detail/ripemd_160.hpp
libcaf_core/caf/detail/ripemd_160.hpp
+33
-35
libcaf_core/caf/monitorable_actor.hpp
libcaf_core/caf/monitorable_actor.hpp
+1
-3
libcaf_core/src/detail/glob_match.cpp
libcaf_core/src/detail/glob_match.cpp
+26
-28
libcaf_core/src/detail/private_thread_pool.cpp
libcaf_core/src/detail/private_thread_pool.cpp
+3
-17
libcaf_core/src/detail/ripemd_160.cpp
libcaf_core/src/detail/ripemd_160.cpp
+34
-37
libcaf_core/src/scheduler/abstract_coordinator.cpp
libcaf_core/src/scheduler/abstract_coordinator.cpp
+2
-6
libcaf_core/test/detail/private_thread_pool.cpp
libcaf_core/test/detail/private_thread_pool.cpp
+3
-17
libcaf_core/test/typed_spawn.cpp
libcaf_core/test/typed_spawn.cpp
+5
-15
libcaf_io/src/io/network/native_socket.cpp
libcaf_io/src/io/network/native_socket.cpp
+29
-31
libcaf_net/src/net/stream_socket.cpp
libcaf_net/src/net/stream_socket.cpp
+29
-31
No files found.
examples/dynamic_behavior/dining_philosophers.cpp
View file @
01b171f3
/******************************************************************************\
// This example is an implementation of the classical Dining Philosophers
* This example is an implementation of the classical Dining Philosophers *
// exercise using only CAF's event-based actor implementation.
* exercise using only libcaf's event-based actor implementation. *
\******************************************************************************/
#include <chrono>
#include <chrono>
#include <iostream>
#include <iostream>
...
...
examples/message_passing/calculator.cpp
View file @
01b171f3
/******************************************************************************\
// This example is a very basic, non-interactive math service implemented for
* This example is a very basic, non-interactive math service implemented *
// both the blocking and the event-based API.
* for both the blocking and the event-based API. *
\******************************************************************************/
#include <iostream>
#include <iostream>
...
...
examples/message_passing/cell.cpp
View file @
01b171f3
/******************************************************************************\
// This example is a very basic, non-interactive math service implemented for
* This example is a very basic, non-interactive math service implemented *
// both the blocking and the event-based API.
* for both the blocking and the event-based API. *
\******************************************************************************/
#include <cstdint>
#include <cstdint>
#include <iostream>
#include <iostream>
...
...
examples/message_passing/dancing_kirby.cpp
View file @
01b171f3
/******************************************************************************\
// This example illustrates how to do time-triggered loops in CAF.
* This example illustrates how to do time-triggered loops in libcaf. *
\******************************************************************************/
#include <algorithm>
#include <algorithm>
#include <chrono>
#include <chrono>
...
...
examples/message_passing/divider.cpp
View file @
01b171f3
/******************************************************************************\
// A very basic, interactive divider.
* A very basic, interactive divider. *
\******************************************************************************/
#include <iostream>
#include <iostream>
...
...
examples/message_passing/request.cpp
View file @
01b171f3
/******************************************************************************\
// This example illustrates semantics of request().{then|await|receive}.
* Illustrates semantics of request().{then|await|receive}. *
\******************************************************************************/
#include <chrono>
#include <chrono>
#include <cstdint>
#include <cstdint>
...
...
examples/message_passing/typed_calculator.cpp
View file @
01b171f3
/******************************************************************************\
// This example is a very basic, non-interactive math service implemented using
* This example is a very basic, non-interactive math service implemented *
// typed actors.
* using typed actors. *
\******************************************************************************/
#include "caf/all.hpp"
#include "caf/all.hpp"
#include <cassert>
#include <cassert>
...
...
examples/qtsupport/qt_group_chat.cpp
View file @
01b171f3
/******************************************************************************\
// This example program represents a minimal GUI chat program based on group
* This example program represents a minimal GUI chat program *
// communication. This chat program is compatible to the terminal version in
* based on group communication. This chat program is compatible to the *
// length_prefix_framing/chat-server.cpp.
* terminal version in length_prefix_framing/chat-server.cpp. *
//
* *
// Setup for a minimal chat between "alice" and "bob":
* Setup for a minimal chat between "alice" and "bob": *
// - chat-server -p 4242
* - chat-server -p 4242 *
// - qt_group_chat -H localhost -p 4242 -n alice
* - qt_group_chat -H localhost -p 4242 -n alice *
// - qt_group_chat -H localhost -p 4242 -n bob
* - qt_group_chat -H localhost -p 4242 -n bob *
\******************************************************************************/
#include <cstdlib>
#include <cstdlib>
#include <iostream>
#include <iostream>
...
...
examples/remoting/distributed_calculator.cpp
View file @
01b171f3
/******************************************************************************\
// This program is a distributed version of the math_actor example. Client and
* This program is a distributed version of the math_actor example. *
// server use a stateless request/response protocol and the client is failure
* Client and server use a stateless request/response protocol and the client *
// resilient by using a FIFO request queue. The client auto-reconnects and also
* is failure resilient by using a FIFO request queue. *
// allows for server reconfiguration.
* The client auto-reconnects and also allows for server reconfiguration. *
//
* *
// Run server at port 4242:
* Run server at port 4242: *
// - distributed_calculator -s -p 4242
* - distributed_calculator -s -p 4242 *
//
* *
// Run client at the same host:
* Run client at the same host: *
// - distributed_calculator -c -p 4242
* - distributed_calculator -c -p 4242 *
\******************************************************************************/
#include <array>
#include <array>
#include <cassert>
#include <cassert>
...
...
libcaf_core/caf/abstract_actor.hpp
View file @
01b171f3
...
@@ -97,9 +97,7 @@ public:
...
@@ -97,9 +97,7 @@ public:
/// Returns the system that created this actor (or proxy).
/// Returns the system that created this actor (or proxy).
actor_system
&
home_system
()
const
noexcept
;
actor_system
&
home_system
()
const
noexcept
;
/****************************************************************************
// -- here be dragons: end of public interface -------------------------------
* here be dragons: end of public interface *
****************************************************************************/
/// @cond PRIVATE
/// @cond PRIVATE
...
...
libcaf_core/caf/all.hpp
View file @
01b171f3
...
@@ -135,6 +135,33 @@
...
@@ -135,6 +135,33 @@
/// @namespace caf::policy
/// @namespace caf::policy
/// Contains policies encapsulating characteristics or algorithms.
/// Contains policies encapsulating characteristics or algorithms.
///
///
/// @namespace caf::telemetry
/// Contains classes and functions for collecting telemetry data.
///
/// @namespace caf::net
/// Contains all classes and functions related to network protocols.
///
/// @namespace caf::net::dsl
/// Contains building blocks to assemble protocol stacks in a declarative way.
///
/// @namespace caf::net::http
/// Contains an implementation for HTTP.
///
/// @namespace caf::net::ssl
/// Contains wrappers for convenient access to SSL.
///
/// @namespace caf::net::octet_stream
/// Contains classes and utilities for transports that operate on raw octets.
///
/// @namespace caf::net::prometheus
/// Contains a scraper for exposing metrics from an actor system to Prometheus.
///
/// @namespace caf::net::web_socket
/// Contains an implementation for message exchange over the WebSocket protocol.
///
/// @namespace caf::net::lp
/// Contains an implementation for message exchange over length-prefix framing.
///
/// @namespace caf::io
/// @namespace caf::io
/// Contains all IO-related classes and functions.
/// Contains all IO-related classes and functions.
///
///
...
...
libcaf_core/caf/caf_main.hpp
View file @
01b171f3
/******************************************************************************
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
* ____ _ _____ *
// the main distribution directory for license terms and copyright or visit
* / ___| / \ | ___| C++ *
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2018 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
#pragma once
...
...
libcaf_core/caf/detail/private_thread_pool.hpp
View file @
01b171f3
/******************************************************************************
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
* ____ _ _____ *
// the main distribution directory for license terms and copyright or visit
* / ___| / \ | ___| C++ *
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2021 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
#pragma once
...
...
libcaf_core/caf/detail/ripemd_160.hpp
View file @
01b171f3
...
@@ -2,41 +2,39 @@
...
@@ -2,41 +2,39 @@
// the main distribution directory for license terms and copyright or visit
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
/******************************************************************************\
// Based on http://homes.esat.kuleuven.be/~cosicart/ps/AB-9601/rmd160.h;
* Based on http://homes.esat.kuleuven.be/~cosicart/ps/AB-9601/rmd160.h;
// original header:
* original header:
//
*
// AUTHOR: Antoon Bosselaers, ESAT-COSIC
* AUTHOR: Antoon Bosselaers, ESAT-COSIC
// DATE: 1 March 1996
* DATE: 1 March 1996
// VERSION: 1.0
* VERSION: 1.0
//
*
// Copyright (c) Katholieke Universiteit Leuven
* Copyright (c) Katholieke Universiteit Leuven
// 1996, All Rights Reserved
* 1996, All Rights Reserved
//
*
// Conditions for use of the RIPEMD-160 Software
* Conditions for use of the RIPEMD-160 Software
//
*
// The RIPEMD-160 software is freely available for use under the terms and
* The RIPEMD-160 software is freely available for use under the terms and
// conditions described hereunder, which shall be deemed to be accepted by
* conditions described hereunder, which shall be deemed to be accepted by
// any user of the software and applicable on any use of the software:
* any user of the software and applicable on any use of the software:
//
*
// 1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC shall for
* 1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC shall for
// all purposes be considered the owner of the RIPEMD-160 software and of
* all purposes be considered the owner of the RIPEMD-160 software and of
// all copyright, trade secret, patent or other intellectual property
* all copyright, trade secret, patent or other intellectual property
// rights therein.
* rights therein.
// 2. The RIPEMD-160 software is provided on an "as is" basis without
* 2. The RIPEMD-160 software is provided on an "as is" basis without
// warranty of any sort, express or implied. K.U.Leuven makes no
* warranty of any sort, express or implied. K.U.Leuven makes no
// representation that the use of the software will not infringe any
* representation that the use of the software will not infringe any
// patent or proprietary right of third parties. User will indemnify
* patent or proprietary right of third parties. User will indemnify
// K.U.Leuven and hold K.U.Leuven harmless from any claims or liabilities
* K.U.Leuven and hold K.U.Leuven harmless from any claims or liabilities
// which may arise as a result of its use of the software. In no
* which may arise as a result of its use of the software. In no
// circumstances K.U.Leuven R&D will be held liable for any deficiency,
* circumstances K.U.Leuven R&D will be held liable for any deficiency,
// fault or other mishappening with regard to the use or performance of
* fault or other mishappening with regard to the use or performance of
// the software.
* the software.
// 3. User agrees to give due credit to K.U.Leuven in scientific publications
* 3. User agrees to give due credit to K.U.Leuven in scientific publications
// or communications in relation with the use of the RIPEMD-160 software
* or communications in relation with the use of the RIPEMD-160 software
// as follows: RIPEMD-160 software written by Antoon Bosselaers,
* as follows: RIPEMD-160 software written by Antoon Bosselaers,
// available at http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/.
* available at http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/.
\******************************************************************************/
#pragma once
#pragma once
...
...
libcaf_core/caf/monitorable_actor.hpp
View file @
01b171f3
...
@@ -102,9 +102,7 @@ protected:
...
@@ -102,9 +102,7 @@ protected:
/// Creates a new actor instance.
/// Creates a new actor instance.
explicit
monitorable_actor
(
actor_config
&
cfg
);
explicit
monitorable_actor
(
actor_config
&
cfg
);
/****************************************************************************
// -- here be dragons: end of public interface -------------------------------
* here be dragons: end of public interface *
****************************************************************************/
// precondition: `mtx_` is acquired
// precondition: `mtx_` is acquired
void
attach_impl
(
attachable_ptr
&
ptr
)
{
void
attach_impl
(
attachable_ptr
&
ptr
)
{
...
...
libcaf_core/src/detail/glob_match.cpp
View file @
01b171f3
...
@@ -5,34 +5,32 @@
...
@@ -5,34 +5,32 @@
// Based on work of others. Retrieved on 2020-07-01 from
// Based on work of others. Retrieved on 2020-07-01 from
// https://github.com/Genivia/ugrep/blob/d2fb133/src/glob.cpp.
// https://github.com/Genivia/ugrep/blob/d2fb133/src/glob.cpp.
// Original header / license:
// Original header / license:
//
/******************************************************************************\
// Copyright (c) 2019, Robert van Engelen, Genivia Inc. All rights reserved.
* Copyright (c) 2019, Robert van Engelen, Genivia Inc. All rights reserved. *
//
* *
// Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without *
// modification, are permitted provided that the following conditions are met:
* modification, are permitted provided that the following conditions are met: *
//
* *
// (1) Redistributions of source code must retain the above copyright notice,
* (1) Redistributions of source code must retain the above copyright notice, *
// this list of conditions and the following disclaimer.
* this list of conditions and the following disclaimer. *
//
* *
// (2) Redistributions in binary form must reproduce the above copyright
* (2) Redistributions in binary form must reproduce the above copyright *
// notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the *
// documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution. *
//
* *
// (3) The name of the author may not be used to endorse or promote products
* (3) The name of the author may not be used to endorse or promote products *
// derived from this software without specific prior written permission.
* derived from this software without specific prior written permission. *
//
* *
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED *
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO *
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, *
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR *
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
\******************************************************************************/
#include "caf/detail/glob_match.hpp"
#include "caf/detail/glob_match.hpp"
...
...
libcaf_core/src/detail/private_thread_pool.cpp
View file @
01b171f3
/******************************************************************************
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
* ____ _ _____ *
// the main distribution directory for license terms and copyright or visit
* / ___| / \ | ___| C++ *
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2021 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#include "caf/detail/private_thread_pool.hpp"
#include "caf/detail/private_thread_pool.hpp"
...
...
libcaf_core/src/detail/ripemd_160.cpp
View file @
01b171f3
...
@@ -2,43 +2,40 @@
...
@@ -2,43 +2,40 @@
// the main distribution directory for license terms and copyright or visit
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
/******************************************************************************\
// Based on http://homes.esat.kuleuven.be/~cosicart/ps/AB-9601/rmd160.c;
* Based on http://homes.esat.kuleuven.be/~cosicart/ps/AB-9601/rmd160.c; *
// original header:
* original header: *
//
* *
// AUTHOR: Antoon Bosselaers, ESAT-COSIC
* AUTHOR: Antoon Bosselaers, ESAT-COSIC *
// DATE: 1 March 1996
* DATE: 1 March 1996 *
// VERSION: 1.0
* VERSION: 1.0 *
//
* *
// Copyright (c) Katholieke Universiteit Leuven
* Copyright (c) Katholieke Universiteit Leuven *
// 1996, All Rights Reserved
* 1996, All Rights Reserved *
//
* *
// Conditions for use of the RIPEMD-160 Software
* Conditions for use of the RIPEMD-160 Software *
//
* *
// The RIPEMD-160 software is freely available for use under the terms and
* The RIPEMD-160 software is freely available for use under the terms and *
// conditions described hereunder, which shall be deemed to be accepted by
* conditions described hereunder, which shall be deemed to be accepted by *
// any user of the software and applicable on any use of the software:
* any user of the software and applicable on any use of the software: *
//
* *
// 1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC shall for
* 1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC shall for *
// all purposes be considered the owner of the RIPEMD-160 software and of
* all purposes be considered the owner of the RIPEMD-160 software and of *
// all copyright, trade secret, patent or other intellectual property
* all copyright, trade secret, patent or other intellectual property *
// rights therein.
* rights therein. *
// 2. The RIPEMD-160 software is provided on an "as is" basis without
* 2. The RIPEMD-160 software is provided on an "as is" basis without *
// warranty of any sort, express or implied. K.U.Leuven makes no
* warranty of any sort, express or implied. K.U.Leuven makes no *
// representation that the use of the software will not infringe any
* representation that the use of the software will not infringe any *
// patent or proprietary right of third parties. User will indemnify
* patent or proprietary right of third parties. User will indemnify *
// K.U.Leuven and hold K.U.Leuven harmless from any claims or liabilities
* K.U.Leuven and hold K.U.Leuven harmless from any claims or liabilities *
// which may arise as a result of its use of the software. In no
* which may arise as a result of its use of the software. In no *
// circumstances K.U.Leuven R&D will be held liable for any deficiency,
* circumstances K.U.Leuven R&D will be held liable for any deficiency, *
// fault or other mishappening with regard to the use or performance of
* fault or other mishappening with regard to the use or performance of *
// the software.
* the software. *
// 3. User agrees to give due credit to K.U.Leuven in scientific
* 3. User agrees to give due credit to K.U.Leuven in scientific *
// publications or communications in relation with the use of the
* publications or communications in relation with the use of the *
// RIPEMD-160 software as follows: RIPEMD-160 software written by
* RIPEMD-160 software as follows: RIPEMD-160 software written by *
// Antoon Bosselaers,
* Antoon Bosselaers, *
// available at http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/.
* available at http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/. *
* *
\******************************************************************************/
#include "caf/detail/ripemd_160.hpp"
#include "caf/detail/ripemd_160.hpp"
#include <cstring>
#include <cstring>
...
...
libcaf_core/src/scheduler/abstract_coordinator.cpp
View file @
01b171f3
...
@@ -31,9 +31,7 @@
...
@@ -31,9 +31,7 @@
namespace
caf
::
scheduler
{
namespace
caf
::
scheduler
{
/******************************************************************************
// -- utility and implementation details ---------------------------------------
* utility and implementation details *
******************************************************************************/
namespace
{
namespace
{
...
@@ -164,9 +162,7 @@ public:
...
@@ -164,9 +162,7 @@ public:
}
// namespace
}
// namespace
/******************************************************************************
// -- implementation of coordinator --------------------------------------------
* implementation of coordinator *
******************************************************************************/
const
actor_system_config
&
abstract_coordinator
::
config
()
const
{
const
actor_system_config
&
abstract_coordinator
::
config
()
const
{
return
system_
.
config
();
return
system_
.
config
();
...
...
libcaf_core/test/detail/private_thread_pool.cpp
View file @
01b171f3
/******************************************************************************
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
* ____ _ _____ *
// the main distribution directory for license terms and copyright or visit
* / ___| / \ | ___| C++ *
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2021 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#define CAF_SUITE detail.private_thread_pool
#define CAF_SUITE detail.private_thread_pool
...
...
libcaf_core/test/typed_spawn.cpp
View file @
01b171f3
...
@@ -42,9 +42,7 @@ static_assert(std::is_convertible<dummy5, dummy3>::value,
...
@@ -42,9 +42,7 @@ static_assert(std::is_convertible<dummy5, dummy3>::value,
static_assert
(
std
::
is_convertible
<
dummy5
,
dummy4
>::
value
,
static_assert
(
std
::
is_convertible
<
dummy5
,
dummy4
>::
value
,
"handle not assignable to narrower definition"
);
"handle not assignable to narrower definition"
);
/******************************************************************************
// -- simple request/response test ---------------------------------------------
* simple request/response test *
******************************************************************************/
using
server_type
=
typed_actor
<
result
<
bool
>
(
my_request
)
>
;
using
server_type
=
typed_actor
<
result
<
bool
>
(
my_request
)
>
;
...
@@ -81,9 +79,7 @@ void client(event_based_actor* self, const actor& parent,
...
@@ -81,9 +79,7 @@ void client(event_based_actor* self, const actor& parent,
});
});
}
}
/******************************************************************************
// -- test skipping of messages intentionally + using become() -----------------
* test skipping of messages intentionally + using become() *
******************************************************************************/
using
event_testee_type
using
event_testee_type
=
typed_actor
<
result
<
string
>
(
get_state_atom
),
result
<
void
>
(
string
),
=
typed_actor
<
result
<
string
>
(
get_state_atom
),
result
<
void
>
(
string
),
...
@@ -127,9 +123,7 @@ public:
...
@@ -127,9 +123,7 @@ public:
}
}
};
};
/******************************************************************************
// -- simple 'forwarding' chain ------------------------------------------------
* simple 'forwarding' chain *
******************************************************************************/
using
string_actor
=
typed_actor
<
result
<
string
>
(
string
)
>
;
using
string_actor
=
typed_actor
<
result
<
string
>
(
string
)
>
;
...
@@ -178,9 +172,7 @@ maybe_string_delegator(maybe_string_actor::pointer self,
...
@@ -178,9 +172,7 @@ maybe_string_delegator(maybe_string_actor::pointer self,
};
};
}
}
/******************************************************************************
// -- sending typed actor handles ----------------------------------------------
* sending typed actor handles *
******************************************************************************/
int_actor
::
behavior_type
int_fun
()
{
int_actor
::
behavior_type
int_fun
()
{
return
{
return
{
...
@@ -256,9 +248,7 @@ struct fixture : test_coordinator_fixture<> {
...
@@ -256,9 +248,7 @@ struct fixture : test_coordinator_fixture<> {
BEGIN_FIXTURE_SCOPE
(
fixture
)
BEGIN_FIXTURE_SCOPE
(
fixture
)
/******************************************************************************
// -- putting it all together --------------------------------------------------
* put it all together *
******************************************************************************/
CAF_TEST
(
typed_spawns
)
{
CAF_TEST
(
typed_spawns
)
{
MESSAGE
(
"run test series with typed_server1"
);
MESSAGE
(
"run test series with typed_server1"
);
...
...
libcaf_io/src/io/network/native_socket.cpp
View file @
01b171f3
...
@@ -252,37 +252,35 @@ expected<void> allow_udp_connreset(native_socket fd, bool new_value) {
...
@@ -252,37 +252,35 @@ expected<void> allow_udp_connreset(native_socket fd, bool new_value) {
return
unit
;
return
unit
;
}
}
/**************************************************************************\
// Based on work of others;
* Based on work of others; *
// original header:
* original header: *
//
* *
// Copyright 2007, 2010 by Nathan C. Myers <ncm@cantrip.org>
* Copyright 2007, 2010 by Nathan C. Myers <ncm@cantrip.org> *
// Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without *
// modification, are permitted provided that the following conditions
* modification, are permitted provided that the following conditions *
// are met:
* are met: *
//
* *
// Redistributions of source code must retain the above copyright notice,
* Redistributions of source code must retain the above copyright notice, *
// this list of conditions and the following disclaimer.
* this list of conditions and the following disclaimer. *
//
* *
// Redistributions in binary form must reproduce the above copyright
* Redistributions in binary form must reproduce the above copyright *
// notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the *
// documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution. *
//
* *
// The name of the author must not be used to endorse or promote products
* The name of the author must not be used to endorse or promote products *
// derived from this software without specific prior written permission.
* derived from this software without specific prior written permission. *
//
* *
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR *
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT *
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
\**************************************************************************/
std
::
pair
<
native_socket
,
native_socket
>
create_pipe
()
{
std
::
pair
<
native_socket
,
native_socket
>
create_pipe
()
{
socket_size_type
addrlen
=
sizeof
(
sockaddr_in
);
socket_size_type
addrlen
=
sizeof
(
sockaddr_in
);
native_socket
socks
[
2
]
=
{
invalid_native_socket
,
invalid_native_socket
};
native_socket
socks
[
2
]
=
{
invalid_native_socket
,
invalid_native_socket
};
...
...
libcaf_net/src/net/stream_socket.cpp
View file @
01b171f3
...
@@ -25,37 +25,35 @@ namespace caf::net {
...
@@ -25,37 +25,35 @@ namespace caf::net {
constexpr
int
no_sigpipe_io_flag
=
0
;
constexpr
int
no_sigpipe_io_flag
=
0
;
/**************************************************************************\
// Based on work of others;
* Based on work of others; *
// original header:
* original header: *
//
* *
// Copyright 2007, 2010 by Nathan C. Myers <ncm@cantrip.org>
* Copyright 2007, 2010 by Nathan C. Myers <ncm@cantrip.org> *
// Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without *
// modification, are permitted provided that the following conditions
* modification, are permitted provided that the following conditions *
// are met:
* are met: *
//
* *
// Redistributions of source code must retain the above copyright notice,
* Redistributions of source code must retain the above copyright notice, *
// this list of conditions and the following disclaimer.
* this list of conditions and the following disclaimer. *
//
* *
// Redistributions in binary form must reproduce the above copyright
* Redistributions in binary form must reproduce the above copyright *
// notice, this list of conditions and the following disclaimer in the
* notice, this list of conditions and the following disclaimer in the *
// documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution. *
//
* *
// The name of the author must not be used to endorse or promote products
* The name of the author must not be used to endorse or promote products *
// derived from this software without specific prior written permission.
* derived from this software without specific prior written permission. *
//
* *
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR *
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT *
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
\**************************************************************************/
expected
<
std
::
pair
<
stream_socket
,
stream_socket
>>
make_stream_socket_pair
()
{
expected
<
std
::
pair
<
stream_socket
,
stream_socket
>>
make_stream_socket_pair
()
{
auto
addrlen
=
static_cast
<
int
>
(
sizeof
(
sockaddr_in
));
auto
addrlen
=
static_cast
<
int
>
(
sizeof
(
sockaddr_in
));
socket_id
socks
[
2
]
=
{
invalid_socket_id
,
invalid_socket_id
};
socket_id
socks
[
2
]
=
{
invalid_socket_id
,
invalid_socket_id
};
...
...
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