Skip to content

Commit ed98e3a

Browse files
committed
Communication protocol for Dive: Socket connection
- The socket connection header and its implementation were added. - An initial cmake setup was added for transfer_client and transfer_server libraries.
1 parent 1f43e9a commit ed98e3a

File tree

4 files changed

+786
-0
lines changed

4 files changed

+786
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ if (NOT ANDROID)
9696
add_subdirectory(third_party/googletest)
9797
endif()
9898

99+
add_subdirectory(network)
99100
add_subdirectory(capture_service)
100101
add_subdirectory(layer)
101102
add_subdirectory(runtime_layer)

network/CMakeLists.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
18+
19+
project(network)
20+
21+
# Define source files for the client library.
22+
set(NETWORK_CLIENT_SRCS socket_connection.cc)
23+
24+
# Define header files for the client library.
25+
set(NETWORK_CLIENT_HDRS socket_connection.h)
26+
27+
# Create the client library.
28+
add_library(network_client SHARED ${NETWORK_CLIENT_SRCS} ${NETWORK_CLIENT_HDRS})
29+
30+
# Set include directories for the client library.
31+
target_include_directories(network_client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
32+
33+
# Define source files for the server library.
34+
set(NETWORK_SERVER_SRCS socket_connection.cc)
35+
36+
# Define header files for the server library.
37+
set(NETWORK_SERVER_HDRS socket_connection.h)
38+
39+
# Create the server library.
40+
add_library(network_server SHARED ${NETWORK_SERVER_SRCS} ${NETWORK_SERVER_HDRS})
41+
42+
# Set include directories for the server library.
43+
target_include_directories(network_server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

0 commit comments

Comments
 (0)