Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Virtual Acoustics Plugin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Virtual Acoustics Plugin
Commits
d1f00a25
Commit
d1f00a25
authored
1 year ago
by
Jonathan Ehret
Browse files
Options
Downloads
Patches
Plain Diff
send last modification time of files to check for changed files
parent
bcf588c3
No related branches found
No related tags found
1 merge request
!9
VAServerLauncher Improvement (now also sending reproduction type and ini)
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/VAPlugin/Private/VAServerLauncher.cpp
+14
-4
14 additions, 4 deletions
Source/VAPlugin/Private/VAServerLauncher.cpp
with
14 additions
and
4 deletions
Source/VAPlugin/Private/VAServerLauncher.cpp
+
14
−
4
View file @
d1f00a25
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include
"VAUtils.h"
#include
"VAUtils.h"
#include
"VASettings.h"
#include
"VASettings.h"
#include
"VAPlugin.h"
#include
"VAPlugin.h"
#include
"HAL/FileManagerGeneric.h"
bool
FVAServerLauncher
::
RemoteStartVAServer
(
const
FString
&
Host
,
const
int
Port
,
const
FString
&
VersionName
,
const
FString
&
VARendererIniFile
,
const
EReproductionInput
ReproductionInputType
)
bool
FVAServerLauncher
::
RemoteStartVAServer
(
const
FString
&
Host
,
const
int
Port
,
const
FString
&
VersionName
,
const
FString
&
VARendererIniFile
,
const
EReproductionInput
ReproductionInputType
)
...
@@ -213,15 +214,23 @@ bool FVAServerLauncher::SendFileToVAServer(const FString& RelativeFilename)
...
@@ -213,15 +214,23 @@ bool FVAServerLauncher::SendFileToVAServer(const FString& RelativeFilename)
TArray
<
uint8
>
FileBinaryArray
;
TArray
<
uint8
>
FileBinaryArray
;
FFileHelper
::
LoadFileToArray
(
FileBinaryArray
,
*
FPaths
::
Combine
(
FPaths
::
ProjectContentDir
(),
RelativeFilename
));
FFileHelper
::
LoadFileToArray
(
FileBinaryArray
,
*
FPaths
::
Combine
(
FPaths
::
ProjectContentDir
(),
RelativeFilename
));
FString
FullPath
=
FPaths
::
Combine
(
FPaths
::
ProjectContentDir
(),
RelativeFilename
);
const
TCHAR
*
charFilePath
=
*
FullPath
;
FFileManagerGeneric
fm
;
FDateTime
LastModification
=
fm
.
GetTimeStamp
(
charFilePath
);
const
FString
ProjectName
=
GetDefault
<
UGeneralProjectSettings
>
()
->
ProjectName
;
const
FString
ProjectName
=
GetDefault
<
UGeneralProjectSettings
>
()
->
ProjectName
;
FString
MetaInfo
=
"file:"
+
RelativeFilename
+
":"
+
FString
::
FromInt
(
FileBinaryArray
.
Num
())
+
":"
+
ProjectName
;
FString
MetaInfo
=
"file:"
+
RelativeFilename
+
":"
+
FString
::
FromInt
(
FileBinaryArray
.
Num
())
+
":"
+
ProjectName
+
":"
+
FString
::
FromInt
(
LastModification
.
ToUnixTimestamp
());
TArray
<
uint8
>
MetaInfoBinary
=
ConvertString
(
MetaInfo
);
TArray
<
uint8
>
MetaInfoBinary
=
ConvertString
(
MetaInfo
);
int32
BytesSend
;
int32
BytesSend
;
VAServerLauncherSocket
->
Send
(
MetaInfoBinary
.
GetData
(),
MetaInfoBinary
.
Num
(),
BytesSend
);
VAServerLauncherSocket
->
Send
(
MetaInfoBinary
.
GetData
(),
MetaInfoBinary
.
Num
(),
BytesSend
);
//Receive response
//Receive response
const
int32
BufferSize
=
1
6
;
const
int32
BufferSize
=
1
28
;
int32
BytesRead
=
0
;
int32
BytesRead
=
0
;
uint8
Response
[
16
];
uint8
Response
[
16
];
if
(
VAServerLauncherSocket
->
Recv
(
Response
,
BufferSize
,
BytesRead
))
if
(
VAServerLauncherSocket
->
Recv
(
Response
,
BufferSize
,
BytesRead
))
...
@@ -239,7 +248,8 @@ bool FVAServerLauncher::SendFileToVAServer(const FString& RelativeFilename)
...
@@ -239,7 +248,8 @@ bool FVAServerLauncher::SendFileToVAServer(const FString& RelativeFilename)
}
}
FVAUtils
::
LogStuff
(
"[FVAServerLauncher::SendFileToVAServer()]: Entire file ("
+
RelativeFilename
+
") send!"
,
false
);
FVAUtils
::
LogStuff
(
"[FVAServerLauncher::SendFileToVAServer()]: Entire file ("
+
RelativeFilename
+
") send!"
,
false
);
VAServerLauncherSocket
->
Recv
(
Response
,
BufferSize
,
BytesRead
);
VAServerLauncherSocket
->
Recv
(
Response
,
BufferSize
,
BytesRead
);
if
(
BytesRead
==
3
&&
Response
[
0
]
==
'a'
&&
Response
[
1
]
==
'c'
&&
Response
[
2
]
==
'k'
)
ResponseString
=
ByteArrayToString
(
Response
,
BytesRead
);
if
(
ResponseString
==
"ack"
)
{
{
FVAUtils
::
LogStuff
(
"[FVAServerLauncher::SendFileToVAServer()]: File was received by VAServerLauncher successfully!"
,
false
);
FVAUtils
::
LogStuff
(
"[FVAServerLauncher::SendFileToVAServer()]: File was received by VAServerLauncher successfully!"
,
false
);
//the search path is added potenitally multiple times, but can only be added once the folder is created (which the above guarantees)
//the search path is added potenitally multiple times, but can only be added once the folder is created (which the above guarantees)
...
...
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