Skip to content

Commit

Permalink
Merge pull request #17 from aws-lumberyard-dev/cgalvan/gitflow_211130…
Browse files Browse the repository at this point in the history
…_netsoaktest_main

Merged `stabilization/2110` to `main`
  • Loading branch information
cgalvan authored Dec 2, 2021
2 parents 3d792b8 + 256c1de commit 2f6d92b
Show file tree
Hide file tree
Showing 23 changed files with 688 additions and 53 deletions.
19 changes: 12 additions & 7 deletions .lfsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
# Default LFS endpoint for this repository
url=https://d1yvon24npinwb.cloudfront.net/api/v1

# To use the endpoint with your fork:
# 1. uncomment the url line below by removing the '#'
# 2. replace 'owner' with the username or organization that owns the fork
# 3. have git ignore your local modification of this file by running
# git update-index --skip-worktree .lfsconfig

# url=https://d1yvon24npinwb.cloudfront.net/api/v1/fork/owner
# To use the endpoint with your fork, run the following git command
# in your local repository (without the '#'), replacing 'owner' with
# the username or organization that owns the fork.
#
# git config lfs.url "https://d1yvon24npinwb.cloudfront.net/api/v1/fork/owner"
#
# For example, if your fork is https://github.com/octocat/o3de use
# git config lfs.url "https://d1yvon24npinwb.cloudfront.net/api/v1/fork/octocat"
#
# IMPORTANT: authenticate with your GitHub username and personal access token
# not your GitHub password

5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions EngineFinder.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# {BEGIN_LICENSE}
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Include/NetSoakTest/NetSoakTestBus.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Platform/Android/netsoaktest_android_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Platform/Linux/netsoaktest_linux_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Platform/Mac/netsoaktest_mac_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Platform/Windows/netsoaktest_windows_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Platform/iOS/netsoaktest_ios_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Source/NetSoakTestModule.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
Expand Down
15 changes: 10 additions & 5 deletions Gem/Code/Source/NetSoakTestSystemComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
Expand Down Expand Up @@ -208,6 +209,11 @@ namespace NetSoakTest
return AZ::TICK_PLACEMENT + 2;
}

bool NetSoakTestSystemComponent::IsHandshakeComplete() const
{
return true;
}

bool NetSoakTestSystemComponent::HandleRequest([[maybe_unused]] IConnection* connection,
[[maybe_unused]] const IPacketHeader& packetHeader, [[maybe_unused]] const NetSoakTestPackets::Small& packet)
{
Expand All @@ -228,11 +234,10 @@ namespace NetSoakTest

void NetSoakTestSystemComponent::OnConnect(IConnection* connection)
{
ConnectionQuality testQuality;
ConnectionQuality& testQuality = connection->GetConnectionQuality();
testQuality.m_latencyMs = soak_latencyms;
testQuality.m_lossPercentage = soak_losspercentage;
testQuality.m_varianceMs = soak_variancems;
connection->SetConnectionQuality(testQuality);

if (connection->GetConnectionRole() == ConnectionRole::Connector)
{
Expand All @@ -244,7 +249,7 @@ namespace NetSoakTest
}
}

bool NetSoakTestSystemComponent::OnPacketReceived([[maybe_unused]] IConnection* connection, [[maybe_unused]] const IPacketHeader& packetHeader, [[maybe_unused]] ISerializer& serializer)
PacketDispatchResult NetSoakTestSystemComponent::OnPacketReceived(IConnection* connection, const IPacketHeader& packetHeader, ISerializer& serializer)
{
return NetSoakTestPackets::DispatchPacket(connection, packetHeader, serializer, *this);
}
Expand Down
8 changes: 5 additions & 3 deletions Gem/Code/Source/NetSoakTestSystemComponent.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
Expand Down Expand Up @@ -38,6 +39,7 @@ namespace NetSoakTest
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);

bool IsHandshakeComplete() const;
bool HandleRequest(AzNetworking::IConnection* connection, const AzNetworking::IPacketHeader& packetHeader, const NetSoakTestPackets::Small& packet);
bool HandleRequest(AzNetworking::IConnection* connection, const AzNetworking::IPacketHeader& packetHeader, const NetSoakTestPackets::Large& packet);

Expand All @@ -64,7 +66,7 @@ namespace NetSoakTest
// IConnectionListener interface
AzNetworking::ConnectResult ValidateConnect(const AzNetworking::IpAddress& remoteAddress, const AzNetworking::IPacketHeader& packetHeader, AzNetworking::ISerializer& serializer) override;
void OnConnect(AzNetworking::IConnection* connection) override;
bool OnPacketReceived(AzNetworking::IConnection* connection, const AzNetworking::IPacketHeader& packetHeader, AzNetworking::ISerializer& serializer) override;
AzNetworking::PacketDispatchResult OnPacketReceived(AzNetworking::IConnection* connection, const AzNetworking::IPacketHeader& packetHeader, AzNetworking::ISerializer& serializer) override;
void OnPacketLost(AzNetworking::IConnection* connection, AzNetworking::PacketId packetId) override;
void OnDisconnect(AzNetworking::IConnection* connection, AzNetworking::DisconnectReason reason, AzNetworking::TerminationEndpoint endpoint) override;
////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/Source/NetSoakTestTypes.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/enabled_gems.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/netsoaktest_autogen_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/netsoaktest_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
5 changes: 3 additions & 2 deletions Gem/Code/netsoaktest_shared_files.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
Expand Down
Loading

0 comments on commit 2f6d92b

Please sign in to comment.