Skip to content

Commit

Permalink
Added bridge-distro
Browse files Browse the repository at this point in the history
  • Loading branch information
vines26 committed May 30, 2024
1 parent 890c973 commit 2e9f9cf
Show file tree
Hide file tree
Showing 6 changed files with 421 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ add_subdirectory(language-shims)
add_subdirectory(source)
if(NOT ANDROID)
add_subdirectory(app/race-cli)
add_subdirectory(app/bridge-distro)
add_subdirectory(test/common/UnifiedTestStub EXCLUDE_FROM_ALL)
add_subdirectory(test/common/DecomposedTestStub EXCLUDE_FROM_ALL)
add_subdirectory(test/common/plugins/DecomposedTestImplementation EXCLUDE_FROM_ALL)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,7 @@ race-cli --dir /client-kits --client-bootstrap-connect --send-channel=twoSixDire
nc localhost 9998
```

Confirm that both clients can send messages to the server via nc. Note that the server will only send messages to one of the clients.
Confirm that both clients can send messages to the server via nc. Note that the server will only send messages to one of the clients.

## Bridge Distro Mode
bridge-distro --passphrase gimme --responses-file /scripts/example-responses.txt --dir /server-kits --recv-channel=twoSixDirectCpp --send-channel=twoSixDirectCpp --param hostname="10.11.1.2" --param PluginCommsTwoSixStub.startPort=26262 --param PluginCommsTwoSixStub.endPort=26269 --debug | tee rrlog
44 changes: 44 additions & 0 deletions app/bridge-distro/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# Copyright 2023 Two Six Technologies
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#


add_executable(bridge-distro bridge-distro.cpp)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

target_include_directories(bridge-distro PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)


target_link_libraries(bridge-distro
raceboat
stdc++fs
Threads::Threads
${CMAKE_DL_LIBS} # Contains dlopen and dlcose for dynamically loading plugins.
)

# TODO enable performance-* and readability-* checks (needs fixes)
setup_clang_tidy_for_target(TARGET bridge-distro)
# setup_cppcheck_for_target(
# TARGET bridge-distro
# CHECKS all
# SUPPRESS unmatchedSuppression unusedFunction missingIncludeSystem useStlAlgorithm
# )
setup_clang_format_for_target(bridge-distro PARENT raceboat)
Loading

0 comments on commit 2e9f9cf

Please sign in to comment.