Space Engineers
Public Member Functions | Properties | List of all members
VRage.Network.IMyStateGroup Interface Reference
Inheritance diagram for VRage.Network.IMyStateGroup:
VRage.Network.IMyNetObject VRage.Network.IMyEventOwner Sandbox.Game.Replication.MyEntityInventoryStateGroup Sandbox.Game.Replication.MyEntityPhysicsStateGroup Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup Sandbox.Game.Replication.MyPropertySyncStateGroup Sandbox.Game.Replication.MyStreamingEntityStateGroup< T > Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup Sandbox.Game.Replication.StateGroups.MyPropertySyncStateGroup Sandbox.Game.Replication.StateGroups.MyStreamingEntityStateGroup< T >

Public Member Functions

void CreateClientData (MyClientStateBase forClient)
 Called on server new clients starts replicating this group. More...
 
void DestroyClientData (MyClientStateBase forClient)
 Called on server when client stops replicating this group. More...
 
void ClientUpdate (MyTimeSpan clientTimestamp)
 Update method called on client. More...
 
void Destroy ()
 Called when state group is being destroyed. More...
 
float GetGroupPriority (int frameCountWithoutSync, MyClientInfo forClient)
 Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f. More...
 
void Serialize (BitStream stream, EndpointId forClient, MyTimeSpan timestamp, byte packetId, int maxBitPosition)
 (De)serializes group state or it's diff for client. When writing, you can write beyond maxBitPosition, but message won't be sent and ACKs won't be received for it. ReplicationServer will detect, that state group written beyond packet size and revert it. When nothing written, ReplicationServer will detect that and state group won't receive ACK for that packet id. More...
 
void OnAck (MyClientStateBase forClient, byte packetId, bool delivered)
 Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet. More...
 
void ForceSend (MyClientStateBase clientData)
 
void TimestampReset (MyTimeSpan timestamp)
 
bool IsStillDirty (EndpointId forClient)
 

Properties

StateGroupEnum GroupType [get]
 
IMyReplicable Owner [get]
 

Detailed Description

Definition at line 6 of file IMyStateGroup.cs.

Member Function Documentation

void VRage.Network.IMyStateGroup.ClientUpdate ( MyTimeSpan  clientTimestamp)
void VRage.Network.IMyStateGroup.CreateClientData ( MyClientStateBase  forClient)
void VRage.Network.IMyStateGroup.Destroy ( )
void VRage.Network.IMyStateGroup.DestroyClientData ( MyClientStateBase  forClient)
void VRage.Network.IMyStateGroup.ForceSend ( MyClientStateBase  clientData)
float VRage.Network.IMyStateGroup.GetGroupPriority ( int  frameCountWithoutSync,
MyClientInfo  forClient 
)

Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f.

Parameters
frameCountWithoutSyncHow long (in update frame count) has client not received sync of this state group.
forClientClient for whom is the priority get.

Implemented in Sandbox.Game.Replication.StateGroups.MyStreamingEntityStateGroup< T >, Sandbox.Game.Replication.MyStreamingEntityStateGroup< T >, Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup, Sandbox.Game.Replication.StateGroups.MyPropertySyncStateGroup, Sandbox.Game.Replication.MyPropertySyncStateGroup, Sandbox.Game.Replication.MyEntityInventoryStateGroup, and Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.

bool VRage.Network.IMyStateGroup.IsStillDirty ( EndpointId  forClient)
void VRage.Network.IMyStateGroup.OnAck ( MyClientStateBase  forClient,
byte  packetId,
bool  delivered 
)

Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet.

Parameters
forClientThe client.
packetIdId of the delivered or lost packet.
deliveredTrue when packet was delivered, false when packet is considered lost.

Implemented in Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup, Sandbox.Game.Replication.MyEntityInventoryStateGroup, Sandbox.Game.Replication.StateGroups.MyStreamingEntityStateGroup< T >, Sandbox.Game.Replication.MyStreamingEntityStateGroup< T >, Sandbox.Game.Replication.MyEntityPhysicsStateGroup, Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup, Sandbox.Game.Replication.StateGroups.MyPropertySyncStateGroup, Sandbox.Game.Replication.MyPropertySyncStateGroup, and Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup.

void VRage.Network.IMyStateGroup.Serialize ( BitStream  stream,
EndpointId  forClient,
MyTimeSpan  timestamp,
byte  packetId,
int  maxBitPosition 
)

(De)serializes group state or it's diff for client. When writing, you can write beyond maxBitPosition, but message won't be sent and ACKs won't be received for it. ReplicationServer will detect, that state group written beyond packet size and revert it. When nothing written, ReplicationServer will detect that and state group won't receive ACK for that packet id.

Parameters
streamStream to write to or read from.
forClientWhen writing the client which will receive the data. When reading, it's null.
packetIdId of packet in which the data will be sent or from which the data is received.
maxBitPositionMaximum position in bit stream where you can write data, it's inclusive.

Implemented in Sandbox.Game.Replication.StateGroups.MyStreamingEntityStateGroup< T >, Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup, Sandbox.Game.Replication.StateGroups.MyPropertySyncStateGroup, Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup, and Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.

void VRage.Network.IMyStateGroup.TimestampReset ( MyTimeSpan  timestamp)

Property Documentation

StateGroupEnum VRage.Network.IMyStateGroup.GroupType
get

Definition at line 8 of file IMyStateGroup.cs.

IMyReplicable VRage.Network.IMyStateGroup.Owner
get

Definition at line 66 of file IMyStateGroup.cs.


The documentation for this interface was generated from the following file: