Space Engineers
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
VRage.Network.MyReplicationLayer Class Referenceabstract
Inheritance diagram for VRage.Network.MyReplicationLayer:
VRage.Network.MyReplicationLayerBase VRage.Serialization.INetObjectResolver VRage.Network.MyReplicationClient VRage.Network.MyReplicationServer

Public Member Functions

virtual void Dispose ()
 
virtual void SetPriorityMultiplier (EndpointId id, float priority)
 
bool IsTypeReplicated (Type type)
 
void ReserveFixedIds (uint maxFixedId)
 Reserves IDs for fixed objects. More...
 
void AddFixedNetworkObject (uint id, IMyNetObject obj)
 Add network object with fixed ID. More...
 
void RemoveFixedObject (uint id, IMyNetObject obj)
 
bool TryGetNetworkIdByObject (IMyNetObject obj, out NetworkId networkId)
 
NetworkId GetNetworkIdByObject (IMyNetObject obj)
 
IMyNetObject GetObjectByNetworkId (NetworkId id)
 
IMyProxyTarget GetProxyTarget (IMyEventProxy proxy)
 
abstract void UpdateBefore ()
 
abstract void UpdateAfter ()
 
abstract void UpdateClientStateGroups ()
 
abstract void SendUpdate ()
 
void ReportReplicatedObjects ()
 
virtual string GetMultiplayerStat ()
 Returns string with current multiplayer status. Use only for debugging. More...
 
bool Invoke (CallSite callSite, BitStream stream, object obj, EndpointId source, MyClientStateBase clientState, bool validate)
 Reads arguments from stream and invokes event. Returns false when validation failed, otherwise true. More...
 
void ProcessEvent (MyPacket packet)
 
- Public Member Functions inherited from VRage.Network.MyReplicationLayerBase
Type GetType (TypeId id)
 
TypeId GetTypeId (Type id)
 
void RaiseEvent< T1, T2 > (T1 arg1, T2 arg2, Func< T1, Action > action, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3 > (T1 arg1, T3 arg3, Func< T1, Action< T2 >> action, T2 arg2, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3, T4 > (T1 arg1, T4 arg4, Func< T1, Action< T2, T3 >> action, T2 arg2, T3 arg3, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3, T4, T5 > (T1 arg1, T5 arg5, Func< T1, Action< T2, T3, T4 >> action, T2 arg2, T3 arg3, T4 arg4, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3, T4, T5, T6 > (T1 arg1, T6 arg6, Func< T1, Action< T2, T3, T4, T5 >> action, T2 arg2, T3 arg3, T4 arg4, T5 arg5, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3, T4, T5, T6, T7 > (T1 arg1, T7 arg7, Func< T1, Action< T2, T3, T4, T5, T6 >> action, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RaiseEvent< T1, T2, T3, T4, T5, T6, T7, T8 > (T1 arg1, T8 arg8, Func< T1, Action< T2, T3, T4, T5, T6, T7 >> action, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, EndpointId endpointId=default(EndpointId), float unreliablePriority=1)
 
void RegisterFromAssembly (IEnumerable< Assembly > assemblies)
 
void RegisterFromAssembly (Assembly assembly)
 

Public Attributes

float PingSmoothFactor = 3.0f
 

Protected Member Functions

 MyReplicationLayer (bool isNetworkAuthority)
 
Type GetTypeByTypeId (TypeId typeId)
 
TypeId GetTypeIdByType (Type type)
 
NetworkId AddNetworkObjectServer (IMyNetObject obj)
 
void AddNetworkObjectClient (NetworkId networkId, IMyNetObject obj)
 
IMyNetObject RemoveNetworkedObject (NetworkId networkID)
 
NetworkId RemoveNetworkedObject (IMyNetObject obj)
 
void RemoveNetworkedObject (NetworkId networkID, IMyNetObject obj)
 
virtual MyClientStateBase GetClientData (EndpointId endpointId)
 
sealed override void DispatchEvent< T1, T2, T3, T4, T5, T6, T7, T8 > (CallSite callSite, EndpointId recipient, float unreliablePriority, ref T1 arg1, ref T2 arg2, ref T3 arg3, ref T4 arg4, ref T5 arg5, ref T6 arg6, ref T7 arg7, ref T8 arg8)
 
virtual void ProcessEvent (BitStream stream, NetworkId networkId, NetworkId blockedNetId, uint eventId, EndpointId sender)
 

Protected Attributes

HashSet< IMyNetObjectFixedObjects = new HashSet<IMyNetObject>()
 
BitStream SendStream = new BitStream()
 
BitStream ReceiveStream = new BitStream()
 
- Protected Attributes inherited from VRage.Network.MyReplicationLayerBase
readonly MyTypeTable m_typeTable = new MyTypeTable()
 

Properties

bool UseSmoothPing [get, set]
 
bool UseSmoothCorrection [get, set]
 
float SmoothCorrectionAmplitude [get, set]
 
int TimestampCorrectionMinimum [get, set]
 
DictionaryKeysReader< IMyNetObject, NetworkIdNetworkObjects [get]
 
- Properties inherited from VRage.Network.MyReplicationLayerBase
DateTime LastMessageFromServer [get, protected set]
 

Additional Inherited Members

- Static Protected Member Functions inherited from VRage.Network.MyReplicationLayerBase
static bool ShouldServerInvokeLocally (CallSite site, EndpointId?localClientEndpoint, EndpointId recipient)
 

Detailed Description

Definition at line 14 of file MyReplicationLayer.cs.

Constructor & Destructor Documentation

VRage.Network.MyReplicationLayer.MyReplicationLayer ( bool  isNetworkAuthority)
inlineprotected

Definition at line 45 of file MyReplicationLayer.cs.

Member Function Documentation

void VRage.Network.MyReplicationLayer.AddFixedNetworkObject ( uint  id,
IMyNetObject  obj 
)
inline

Add network object with fixed ID.

Definition at line 93 of file MyReplicationLayer.cs.

void VRage.Network.MyReplicationLayer.AddNetworkObjectClient ( NetworkId  networkId,
IMyNetObject  obj 
)
inlineprotected

Definition at line 118 of file MyReplicationLayer.cs.

NetworkId VRage.Network.MyReplicationLayer.AddNetworkObjectServer ( IMyNetObject  obj)
inlineprotected

Definition at line 110 of file MyReplicationLayer.cs.

sealed override void VRage.Network.MyReplicationLayer.DispatchEvent< T1, T2, T3, T4, T5, T6, T7, T8 > ( CallSite  callSite,
EndpointId  recipient,
float  unreliablePriority,
ref T1  arg1,
ref T2  arg2,
ref T3  arg3,
ref T4  arg4,
ref T5  arg5,
ref T6  arg6,
ref T7  arg7,
ref T8  arg8 
)
inlineprotectedvirtual

Implements VRage.Network.MyReplicationLayerBase.

Definition at line 36 of file MyReplicationLayer.Events.cs.

virtual void VRage.Network.MyReplicationLayer.Dispose ( )
inlinevirtual
virtual MyClientStateBase VRage.Network.MyReplicationLayer.GetClientData ( EndpointId  endpointId)
inlineprotectedvirtual

Reimplemented in VRage.Network.MyReplicationServer.

Definition at line 292 of file MyReplicationLayer.cs.

virtual string VRage.Network.MyReplicationLayer.GetMultiplayerStat ( )
inlinevirtual

Returns string with current multiplayer status. Use only for debugging.

Returns
Already formatted string with current multiplayer status.

Reimplemented in VRage.Network.MyReplicationServer, and VRage.Network.MyReplicationClient.

Definition at line 308 of file MyReplicationLayer.cs.

NetworkId VRage.Network.MyReplicationLayer.GetNetworkIdByObject ( IMyNetObject  obj)
inline

Definition at line 217 of file MyReplicationLayer.cs.

IMyNetObject VRage.Network.MyReplicationLayer.GetObjectByNetworkId ( NetworkId  id)
inline

Definition at line 229 of file MyReplicationLayer.cs.

IMyProxyTarget VRage.Network.MyReplicationLayer.GetProxyTarget ( IMyEventProxy  proxy)
inline

Definition at line 234 of file MyReplicationLayer.cs.

Type VRage.Network.MyReplicationLayer.GetTypeByTypeId ( TypeId  typeId)
inlineprotected

Definition at line 66 of file MyReplicationLayer.cs.

TypeId VRage.Network.MyReplicationLayer.GetTypeIdByType ( Type  type)
inlineprotected

Definition at line 71 of file MyReplicationLayer.cs.

bool VRage.Network.MyReplicationLayer.Invoke ( CallSite  callSite,
BitStream  stream,
object  obj,
EndpointId  source,
MyClientStateBase  clientState,
bool  validate 
)
inline

Reads arguments from stream and invokes event. Returns false when validation failed, otherwise true.

Definition at line 125 of file MyReplicationLayer.Events.cs.

bool VRage.Network.MyReplicationLayer.IsTypeReplicated ( Type  type)
inline

Definition at line 76 of file MyReplicationLayer.cs.

void VRage.Network.MyReplicationLayer.ProcessEvent ( MyPacket  packet)
inline

Definition at line 134 of file MyReplicationLayer.Events.cs.

virtual void VRage.Network.MyReplicationLayer.ProcessEvent ( BitStream  stream,
NetworkId  networkId,
NetworkId  blockedNetId,
uint  eventId,
EndpointId  sender 
)
inlineprotectedvirtual

Reimplemented in VRage.Network.MyReplicationClient.

Definition at line 149 of file MyReplicationLayer.Events.cs.

void VRage.Network.MyReplicationLayer.RemoveFixedObject ( uint  id,
IMyNetObject  obj 
)
inline

Definition at line 103 of file MyReplicationLayer.cs.

IMyNetObject VRage.Network.MyReplicationLayer.RemoveNetworkedObject ( NetworkId  networkID)
inlineprotected

Definition at line 155 of file MyReplicationLayer.cs.

NetworkId VRage.Network.MyReplicationLayer.RemoveNetworkedObject ( IMyNetObject  obj)
inlineprotected

Definition at line 169 of file MyReplicationLayer.cs.

void VRage.Network.MyReplicationLayer.RemoveNetworkedObject ( NetworkId  networkID,
IMyNetObject  obj 
)
inlineprotected

Definition at line 183 of file MyReplicationLayer.cs.

void VRage.Network.MyReplicationLayer.ReportReplicatedObjects ( )
inline

Definition at line 254 of file MyReplicationLayer.cs.

void VRage.Network.MyReplicationLayer.ReserveFixedIds ( uint  maxFixedId)
inline

Reserves IDs for fixed objects.

Definition at line 85 of file MyReplicationLayer.cs.

abstract void VRage.Network.MyReplicationLayer.SendUpdate ( )
pure virtual
virtual void VRage.Network.MyReplicationLayer.SetPriorityMultiplier ( EndpointId  id,
float  priority 
)
inlinevirtual

Reimplemented in VRage.Network.MyReplicationServer.

Definition at line 62 of file MyReplicationLayer.cs.

bool VRage.Network.MyReplicationLayer.TryGetNetworkIdByObject ( IMyNetObject  obj,
out NetworkId  networkId 
)
inline

Definition at line 205 of file MyReplicationLayer.cs.

abstract void VRage.Network.MyReplicationLayer.UpdateAfter ( )
pure virtual
abstract void VRage.Network.MyReplicationLayer.UpdateBefore ( )
pure virtual
abstract void VRage.Network.MyReplicationLayer.UpdateClientStateGroups ( )
pure virtual

Member Data Documentation

HashSet<IMyNetObject> VRage.Network.MyReplicationLayer.FixedObjects = new HashSet<IMyNetObject>()
protected

Definition at line 17 of file MyReplicationLayer.cs.

float VRage.Network.MyReplicationLayer.PingSmoothFactor = 3.0f

Definition at line 33 of file MyReplicationLayer.cs.

BitStream VRage.Network.MyReplicationLayer.ReceiveStream = new BitStream()
protected

Definition at line 28 of file MyReplicationLayer.cs.

BitStream VRage.Network.MyReplicationLayer.SendStream = new BitStream()
protected

Definition at line 27 of file MyReplicationLayer.cs.

Property Documentation

DictionaryKeysReader<IMyNetObject, NetworkId> VRage.Network.MyReplicationLayer.NetworkObjects
get

Definition at line 41 of file MyReplicationLayer.cs.

float VRage.Network.MyReplicationLayer.SmoothCorrectionAmplitude
getset

Definition at line 35 of file MyReplicationLayer.cs.

int VRage.Network.MyReplicationLayer.TimestampCorrectionMinimum
getset

Definition at line 36 of file MyReplicationLayer.cs.

bool VRage.Network.MyReplicationLayer.UseSmoothCorrection
getset

Definition at line 34 of file MyReplicationLayer.cs.

bool VRage.Network.MyReplicationLayer.UseSmoothPing
getset

Definition at line 32 of file MyReplicationLayer.cs.


The documentation for this class was generated from the following files: