Initial network manager with clients
This commit is contained in:
29
Source/Engine/Networking/NetworkClient.h
Normal file
29
Source/Engine/Networking/NetworkClient.h
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Types.h"
|
||||
#include "NetworkConnection.h"
|
||||
#include "NetworkConnectionState.h"
|
||||
#include "Engine/Scripting/ScriptingObject.h"
|
||||
|
||||
/// <summary>
|
||||
/// High-level network client object (local or connected to the server).
|
||||
/// </summary>
|
||||
API_CLASS(sealed, NoSpawn, Namespace = "FlaxEngine.Networking") class FLAXENGINE_API NetworkClient final : public ScriptingObject
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(NetworkClient);
|
||||
friend class NetworkManager;
|
||||
explicit NetworkClient(NetworkConnection connection);
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Identifier of the client (connection id from local peer).
|
||||
/// </summary>
|
||||
API_FIELD(ReadOnly) NetworkConnection Connection;
|
||||
|
||||
/// <summary>
|
||||
/// Client connection state.
|
||||
/// </summary>
|
||||
API_FIELD(ReadOnly) NetworkConnectionState State;
|
||||
};
|
||||
Reference in New Issue
Block a user