Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • cache-remote-endpoint
  • ipv6
  • license
  • master
  • no_error_while_closing
  • standalone-ers
  • asyncmsg-00-00-01
  • asyncmsg-00-00-02
  • asyncmsg-00-00-03
  • asyncmsg-00-00-04
  • asyncmsg-00-00-05
  • asyncmsg-00-00-06
  • asyncmsg-00-00-07
  • asyncmsg-00-00-08
  • asyncmsg-00-00-09
  • asyncmsg-00-00-10
  • asyncmsg-00-01-00
  • asyncmsg-00-01-01
  • asyncmsg-00-01-02
  • asyncmsg-00-01-03
  • asyncmsg-00-01-04
  • asyncmsg-00-01-05
  • asyncmsg-00-01-06
  • asyncmsg-00-01-07
  • asyncmsg-00-01-08
  • asyncmsg-00-01-09
  • asyncmsg-00-01-10
  • asyncmsg-00-01-11
  • asyncmsg-00-01-12
  • asyncmsg-00-01-13
  • asyncmsg-00-01-14
  • asyncmsg-00-01-15
  • asyncmsg-00-01-16
  • asyncmsg-00-01-17
34 results

Target

Select target project
  • joroemer/asyncmsg
  • atlas-tdaq-software/asyncmsg
2 results
Select Git revision
  • boost-asio-1.87
  • ipv6
  • license
  • master
  • asyncmsg-00-00-01
  • asyncmsg-00-00-02
  • asyncmsg-00-00-03
  • asyncmsg-00-00-04
  • asyncmsg-00-00-05
  • asyncmsg-00-00-06
  • asyncmsg-00-00-07
  • asyncmsg-00-00-08
  • asyncmsg-00-00-09
  • asyncmsg-00-00-10
  • asyncmsg-00-01-00
  • asyncmsg-00-01-01
  • asyncmsg-00-01-02
  • asyncmsg-00-01-03
  • asyncmsg-00-01-04
  • asyncmsg-00-01-05
  • asyncmsg-00-01-06
  • asyncmsg-00-01-07
  • asyncmsg-00-01-08
  • asyncmsg-00-01-09
  • asyncmsg-00-01-10
  • asyncmsg-00-01-11
  • asyncmsg-00-01-12
  • asyncmsg-00-01-13
  • asyncmsg-00-01-14
  • asyncmsg-00-01-15
  • asyncmsg-00-01-16
  • asyncmsg-00-01-17
32 results
Show changes
Commits on Source (12)
tdaq_package()
if (NOT DEFINED TDAQ_PROJECT_NAME OR TDAQ_PROJECT_NAME STREQUAL "")
cmake_minimum_required(VERSION 3.23)
project(asyncmsg)
include(standalone/standalone.cmake)
else()
tdaq_package()
tdaq_add_library(asyncmsg
src/Error.cxx
src/Server.cxx
src/Session.cxx
src/NameService.cxx
src/UDPSession.cxx
src/Interface.cxx
OPTIONS PRIVATE -O3
LINK_LIBRARIES is Boost::system)
tdaq_add_library(asyncmsg
src/Error.cxx
src/Server.cxx
src/Session.cxx
src/NameService.cxx
src/UDPSession.cxx
src/Interface.cxx
OPTIONS PRIVATE -O3
LINK_LIBRARIES is Boost::system)
tdaq_add_executable(test_namesvc NOINSTALL
test/test_namesvc.cxx
LINK_LIBRARIES asyncmsg)
tdaq_add_executable(test_namesvc NOINSTALL
test/test_namesvc.cxx
LINK_LIBRARIES asyncmsg)
tdaq_add_executable(test_udpsession NOINSTALL
test/test_udpsession.cxx
LINK_LIBRARIES asyncmsg)
tdaq_add_is_schema(schema/MsgInfo_is.schema.xml DESTINATION schema)
tdaq_add_executable(test_udpsession NOINSTALL
test/test_udpsession.cxx
LINK_LIBRARIES asyncmsg)
tdaq_add_is_schema(schema/MsgInfo_is.schema.xml DESTINATION schema)
endif()
......@@ -45,7 +45,10 @@ void Server::startAccept(const std::shared_ptr<Server>& self,
m_acceptor.async_accept(session->m_socket, m_strand.wrap(
[this, self, session] (const boost::system::error_code& error) {
if (error) {
onAcceptError(error, session);
// Expect errors when closing the server while listening for connections
if (m_isListening.load()) {
onAcceptError(error, session);
}
}
else {
session->m_state = Session::State::OPEN_PENDING;
......@@ -58,9 +61,9 @@ void Server::startAccept(const std::shared_ptr<Server>& self,
void Server::close()
{
m_isListening = false;
m_acceptor.close();
m_localName.clear();
m_isListening = false;
}
boost::asio::ip::tcp::endpoint Server::localEndpoint() const
......
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Boost COMPONENTS system)
include("${CMAKE_CURRENT_LIST_DIR}/asyncmsgTargets.cmake")
\ No newline at end of file
set(CMAKE_CXX_STANDARD 20)
find_package(Boost REQUIRED COMPONENTS system)
message(NOTICE "Standalone asyncmsg build does not support name service")
add_library(asyncmsg
src/Error.cxx
src/Server.cxx
src/Session.cxx
src/UDPSession.cxx
src/Interface.cxx
)
target_link_libraries(asyncmsg PRIVATE Boost::system)
target_include_directories(asyncmsg PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
target_include_directories(asyncmsg INTERFACE
$<INSTALL_INTERFACE:include>
)
target_sources(asyncmsg
PUBLIC
FILE_SET public_headers
TYPE HEADERS
FILES
asyncmsg/asyncmsg.h
asyncmsg/Error.h
asyncmsg/Message.h
asyncmsg/Server.h
asyncmsg/Session.h
asyncmsg/UDPSession.h
asyncmsg/detail/Header.h
)
install(TARGETS asyncmsg
EXPORT asyncmsgTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
FILE_SET public_headers
)
install(EXPORT asyncmsgTargets
FILE asyncmsgTargets.cmake
NAMESPACE asyncmsg::
DESTINATION lib/cmake/asyncmsg
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/standalone/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/asyncmsgConfig.cmake"
INSTALL_DESTINATION "lib/cmake/asyncmsg"
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/asyncmsgConfig.cmake
DESTINATION lib/cmake/asyncmsg
)
\ No newline at end of file