![]() |
Open 3D Engine GridMate API Reference
2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <Carrier.h>
Public Attributes | |
class Driver * | m_driver |
class TrafficControl * | m_trafficControl |
class Handshake * | m_handshake |
class Simulator * | m_simulator |
AZStd::shared_ptr< CompressionFactory > | m_compressionFactory |
Abstract factory to provide carrier with compression implementation. | |
int | m_familyType |
Family type (this is driver specific value) for default family use 0. | |
const char * | m_address |
Communication address, when 0 we use any address otherwise we bind a specific one. | |
unsigned int | m_port |
Communication port. When 0 is implicit port (assigned by the system) or a value for explicit port. | |
unsigned int | m_driverReceiveBufferSize |
Driver receive buffer size (0 uses default buffer size). Used only if m_driver == null. | |
unsigned int | m_driverSendBufferSize |
Driver send buffer size (0 uses default buffer size). Used only if m_driver == null. | |
bool | m_driverIsFullPackets |
Used only for sockets drivers and LAN. Normally an internet packet is ~1500 bytes. With full packets you will enable big packets (64 KB or less) packets (which will fail on internet, but usually ok locally). | |
bool | m_driverIsCrossPlatform |
True if we will need communicate across platforms (need to make sure we use common platform features). | |
VersionType | m_version |
Carriers with mismatching version numbers are not allowed to connect to each other. Default is 1. | |
const char * | m_securityData |
Pointer to string with security data. | |
bool | m_enableDisconnectDetection |
Enable/Disable disconnect detection. (should be set to false ONLY for debug purpose) | |
unsigned int | m_connectionTimeoutMS |
Connection timeout in milliseconds. | |
float | m_disconnectDetectionRttThreshold |
Rtt threshold in milliseconds, connection will be dropped once actual rtt is bigger than this value. | |
float | m_disconnectDetectionPacketLossThreshold |
Packet loss percentage threshold (0.0..1.0, 1.0 is 100%), connection will be dropped once actual packet loss exceeds this value. | |
float | m_connectionEvaluationThreshold |
int | m_threadCpuID |
-1 for no thread use, otherwise the number depends on the platform. AZStd::thread_desc AZ::JobManagerThreadDesc | |
int | m_threadPriority |
depends on the platform, value of -100000 means it will inherit calling thead priority. | |
int | m_threadUpdateTimeMS |
Thread update time in milliseconds [0,100]. This time in general should be higher than 10 milliseconds. Otherwise it will be more efficient to set m_threadFastResponse. | |
bool | m_threadInstantResponse |
unsigned int | m_recvPacketsLimit |
Maximum packets per second allowed to be received from an existing connection. | |
unsigned int | m_maxConnections |
maximum number of connections | |
unsigned int | m_connectionRetryIntervalBase |
Base for expotential backoff of connection request retries (ie. if it's 30, will retry connection request with 30, 60, 120, 240 msec, ... delays) | |
unsigned int | m_connectionRetryIntervalMax |
Cap for interval between connection requests. | |
unsigned int | m_sendBatchPacketCount |
Number of packets queued to force send (rather than wait for m_maxSendRateMS expiration) | |
Carrier descriptor, required structure when we create a carrier (so we know how to set up all parameters)
float GridMate::CarrierDesc::m_connectionEvaluationThreshold |
When a disconnect condition is detected (packet loss, connection timeout, high RTT, etc.) all other connections will be evaluated What we want to achieve is to disconnect connections in groups, as big as possible. To do so, we use a factor.This factor is percentage (0.00 to 1.00) of the disconnect conditions to be used to determine if a connection is bad. Default factor 0.5. Example: Let's say our connection timeout is 10 sec. We have N connections. We detected a disconnection from connection X reaching a 10 sec limit. if the connectionEvaluationThreshold is let's say 0.5 (default) all connections that we have not heard for 10 * 0.5 = 5 sec we will be disconnected on the spot.
bool GridMate::CarrierDesc::m_threadInstantResponse |
This flag is used to instruct carrier thread to react instantaneously when a data needs to be send/received.
By default this flag is false as we would like to process network data every m_threadUpdateTimeMS otherwise to achieve this instant response time (0 latency) we will use more bandwidth because messages will be grouped less efficiently (especially true when you have small messages).