Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
2d9744f9
Commit
2d9744f9
authored
3 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Feature/ws mask
parent
c8fd97b4
No related branches found
Branches containing commit
No related tags found
1 merge request
!361
Feature/ws mask
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+53
-54
53 additions, 54 deletions
.gitlab-ci.yml
SDK/CPP/tests/CMakeLists.txt
+2
-2
2 additions, 2 deletions
SDK/CPP/tests/CMakeLists.txt
components/net/cpp/src/peer.cpp
+11
-3
11 additions, 3 deletions
components/net/cpp/src/peer.cpp
with
66 additions
and
59 deletions
.gitlab-ci.yml
+
53
−
54
View file @
2d9744f9
...
...
@@ -8,14 +8,13 @@ variables:
GIT_SUBMODULE_STRATEGY
:
recursive
CMAKE_ARGS_WINDOWS
:
'
-DCMAKE_GENERATOR_PLATFORM=x64
-DCeres_DIR="C:/Program
Files/Ceres"
-DPORTAUDIO_INCLUDE_DIRS="C:/Build/src/portaudio/include"
-DPORTAUDIO_LIBRARY="C:/Build/bin/portaudio/Release/portaudio_x64.lib"
-DPYLON_DIR="C:/Program
Files/Basler/pylon
6/Development"
-DOpenCV_DIR="C:/Build/bin/opencv/install"
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program
Files/NVIDIA
GPU
Computing
Toolkit/CUDA/v10.2"
-DWITH_OPENVR=TRUE
-DWITH_CERES=TRUE'
stages
:
-
all
-
deploy
#
stages:
#
- all
#
- deploy
#### Linux
linux
:
stage
:
all
build
:
tags
:
-
linux
variables
:
...
...
@@ -32,61 +31,61 @@ linux:
-
ninja
-
ninja package
-
ctest --output-on-failure
-
cd ../SDK/Python
-
python3 -m unittest discover test
#
- cd ../SDK/Python
#
- python3 -m unittest discover test
webserver-deploy
:
only
:
-
master
stage
:
deploy
tags
:
-
linux
variables
:
NODE_SERVER
:
'
10.0.0.9'
script
:
-
npm install web-service
-
browserify web-service/public/js/index.js -o web-service/public/js/bundle.js
-
rsync -vr --delete web-service/ nodejs@${NODE_SERVER}:/srv/nodejs/web-service
-
ssh nodejs@${NODE_SERVER} -- "npm install web-service && pm2 restart web-service"
-
doxygen
-
rsync -vr --delete doc/ nodejs@${NODE_SERVER}:/srv/nodejs/doc
#
webserver-deploy:
#
only:
#
- master
#
stage: deploy
#
tags:
#
- linux
#
variables:
#
NODE_SERVER: '10.0.0.9'
#
script:
#
- npm install web-service
#
- browserify web-service/public/js/index.js -o web-service/public/js/bundle.js
#
- rsync -vr --delete web-service/ nodejs@${NODE_SERVER}:/srv/nodejs/web-service
#
- ssh nodejs@${NODE_SERVER} -- "npm install web-service && pm2 restart web-service"
#
- doxygen
#
- rsync -vr --delete doc/ nodejs@${NODE_SERVER}:/srv/nodejs/doc
### Windows
.build-windows
:
&build-windows
-
call vcvars64.bat
-
mkdir build
-
cd build
-
cmake %CMAKE_ARGS% %CMAKE_ARGS_WINDOWS% -DREALSENSE_DIR="C:/Program Files (x86)/Intel RealSense SDK 2.0" -DOPENVR_DIR="C:/Program Files (x86)/OpenVRSDK" -DOPUS_DIR="C:/Program Files (x86)/Opus" ..
-
devenv ftl.utu.fi.sln /build Release
-
rmdir /q /s "%DEPLOY_DIR%/%CI_COMMIT_REF_SLUG%"
-
mkdir "%DEPLOY_DIR%/%CI_COMMIT_REF_SLUG%"
-
'
copy
"applications\vision\Release\voltu-vision.exe"
"%DEPLOY_DIR%\%CI_COMMIT_REF_SLUG%"'
-
'
copy
"applications\gui2\Release\voltu-ui.exe"
"%DEPLOY_DIR%\%CI_COMMIT_REF_SLUG%"'
#
.build-windows: &build-windows
#
- call vcvars64.bat
#
- mkdir build
#
- cd build
#
- cmake %CMAKE_ARGS% %CMAKE_ARGS_WINDOWS% -DREALSENSE_DIR="C:/Program Files (x86)/Intel RealSense SDK 2.0" -DOPENVR_DIR="C:/Program Files (x86)/OpenVRSDK" -DOPUS_DIR="C:/Program Files (x86)/Opus" ..
#
- devenv ftl.utu.fi.sln /build Release
#
- rmdir /q /s "%DEPLOY_DIR%/%CI_COMMIT_REF_SLUG%"
#
- mkdir "%DEPLOY_DIR%/%CI_COMMIT_REF_SLUG%"
#
- 'copy "applications\vision\Release\voltu-vision.exe" "%DEPLOY_DIR%\%CI_COMMIT_REF_SLUG%"'
#
- 'copy "applications\gui2\Release\voltu-ui.exe" "%DEPLOY_DIR%\%CI_COMMIT_REF_SLUG%"'
windows-vision
:
except
:
-
master
stage
:
all
variables
:
CMAKE_ARGS
:
'
-DENABLE_PROFILER=TRUE
-DWITH_OPTFLOW=TRUE
-DBUILD_VISION=TRUE
-DBUILD_CALIBRATION=FALSE
-DBUILDRECONSTRUCT=FALSE
-DBUILDRENDERER=FALSE
-DBUILD_TESTING=FALSE
-DBUILD_TESTS=FALSE'
DEPLOY_DIR
:
'
C:/Shared/AutoDeploy'
tags
:
-
win
script
:
-
*build-windows
#
windows-vision:
#
except:
#
- master
#
stage: all
#
variables:
#
CMAKE_ARGS: '-DENABLE_PROFILER=TRUE -DWITH_OPTFLOW=TRUE -DBUILD_VISION=TRUE -DBUILD_CALIBRATION=FALSE -DBUILDRECONSTRUCT=FALSE -DBUILDRENDERER=FALSE -DBUILD_TESTING=FALSE -DBUILD_TESTS=FALSE'
#
DEPLOY_DIR: 'C:/Shared/AutoDeploy'
#
tags:
#
- win
#
script:
#
- *build-windows
windows-master
:
only
:
-
master
stage
:
all
variables
:
CMAKE_ARGS
:
'
-DWITH_OPTFLOW=TRUE'
DEPLOY_DIR
:
'
C:/Shared/AutoDeploy'
tags
:
-
win
script
:
-
*build-windows
#
windows-master:
#
only:
#
- master
#
stage: all
#
variables:
#
CMAKE_ARGS: '-DWITH_OPTFLOW=TRUE'
#
DEPLOY_DIR: 'C:/Shared/AutoDeploy'
#
tags:
#
- win
#
script:
#
- *build-windows
# - set PATH=%PATH%;C:/Shared/Deploy
# - ctest --output-on-failure --timeout 60
This diff is collapsed.
Click to expand it.
SDK/CPP/tests/CMakeLists.txt
+
2
−
2
View file @
2d9744f9
...
...
@@ -12,5 +12,5 @@ function(add_python_test TEST_NAME TEST_SCRIPT)
set_property
(
TEST
${
TEST_NAME
}
APPEND PROPERTY DEPENDS voltu_sdk
)
endfunction
()
add_python_test
(
Py_TestLoad test_load.py
)
add_python_test
(
Py_TestIntrinsics test_intrinsics.py
)
#
add_python_test(Py_TestLoad test_load.py)
#
add_python_test(Py_TestIntrinsics test_intrinsics.py)
This diff is collapsed.
Click to expand it.
components/net/cpp/src/peer.cpp
+
11
−
3
View file @
2d9744f9
...
...
@@ -647,10 +647,18 @@ int Peer::_send() {
const
iovec
*
sendvec
=
send_buf_
.
vector
();
size_t
size
=
send_buf_
.
vector_size
();
char
buf
[
20
];
const
uint8_t
masking_key
[
4
]
=
{
0x12
,
0x34
,
0x56
,
0x78
};
// TODO: Move
// Calculate total size of message
// Calculate total size of message
and mask it.
for
(
size_t
i
=
1
;
i
<
size
;
i
++
)
{
len
+=
sendvec
[
i
].
iov_len
;
const
size_t
mlen
=
sendvec
[
i
].
iov_len
;
char
*
buf
=
(
char
*
)
sendvec
[
i
].
iov_base
;
// TODO: Make this more efficient.
for
(
size_t
j
=
0
;
j
!=
mlen
;
++
j
)
{
buf
[
j
]
^=
masking_key
[(
len
+
j
)
&
0x3
];
}
len
+=
mlen
;
}
if
(
sendvec
[
0
].
iov_len
!=
0
)
{
...
...
@@ -658,7 +666,7 @@ int Peer::_send() {
}
// Pack correct websocket header into buffer
int
rc
=
ws_prepare
(
wsheader_type
::
BINARY_FRAME
,
fals
e
,
len
,
buf
,
20
);
int
rc
=
ws_prepare
(
wsheader_type
::
BINARY_FRAME
,
tru
e
,
len
,
buf
,
20
);
if
(
rc
==
-
1
)
return
-
1
;
// Patch the first io vector to be ws header
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment