Table of Contents

Interface IClient

Namespace
Coherence
Assembly
Coherence.Core.dll
public interface IClient

Properties

ClientID

ClientID ClientID { get; }

Property Value

ClientID

ConnectionSettings

ConnectionSettings ConnectionSettings { get; }

Property Value

ConnectionSettings

ConnectionState

ConnectionState ConnectionState { get; }

Property Value

ConnectionState

ConnectionType

ConnectionType ConnectionType { get; }

Property Value

ConnectionType

Hostname

string Hostname { get; }

Property Value

string

InitialScene

uint InitialScene { get; set; }

Property Value

uint

LastEndpointData

EndpointData LastEndpointData { get; }

Property Value

EndpointData

NetworkTime

NetworkTime NetworkTime { get; }

Property Value

NetworkTime

Ping

Ping Ping { get; }

Property Value

Ping

SendFrequency

byte SendFrequency { get; }

Property Value

byte

Stats

Stats Stats { get; }

Property Value

Stats

Methods

Connect(EndpointData, ConnectionSettings, ConnectionType)

void Connect(EndpointData data, ConnectionSettings connectionSettings, ConnectionType connectionType = ConnectionType.Client)

Parameters

data EndpointData
connectionSettings ConnectionSettings
connectionType ConnectionType

CreateEntity(ICoherenceComponentData[], bool)

SerializeEntityID CreateEntity(ICoherenceComponentData[] data, bool orphan)

Parameters

data ICoherenceComponentData[]
orphan bool

Returns

SerializeEntityID

DebugDropNextOutPacket(Action)

void DebugDropNextOutPacket(Action callback)

Parameters

callback Action

DebugHoldAllPackets(bool)

void DebugHoldAllPackets(bool hold)

Parameters

hold bool

DebugOnEntityAcked(SerializeEntityID, Action)

void DebugOnEntityAcked(SerializeEntityID id, Action callback)

Parameters

id SerializeEntityID
callback Action

DebugOnNextPacketSentOneShot(Action)

void DebugOnNextPacketSentOneShot(Action callback)

Parameters

callback Action

DebugReleaseAllHeldPackets()

void DebugReleaseAllHeldPackets()

DebugSetNetworkCondition(Condition)

void DebugSetNetworkCondition(Condition condition)

Parameters

condition Condition

DebugSetRandom(Random)

void DebugSetRandom(Random random)

Parameters

random Random

DebugStopSerializingUpdates(bool)

void DebugStopSerializingUpdates(bool stop)

Parameters

stop bool

DestroyEntity(SerializeEntityID)

void DestroyEntity(SerializeEntityID id)

Parameters

id SerializeEntityID

Disconnect()

void Disconnect()

EntityExists(SerializeEntityID)

bool EntityExists(SerializeEntityID id)

Parameters

id SerializeEntityID

Returns

bool

GetFloatingOrigin()

Vector3d GetFloatingOrigin()

Returns

Vector3d

HasAuthorityOverEntity(SerializeEntityID, AuthorityType)

bool HasAuthorityOverEntity(SerializeEntityID entity, AuthorityType authorityType)

Parameters

entity SerializeEntityID
authorityType AuthorityType

Returns

bool

IsConnected()

bool IsConnected()

Returns

bool

IsConnecting()

bool IsConnecting()

Returns

bool

IsDisconnected()

bool IsDisconnected()

Returns

bool

Reconnect()

void Reconnect()

RemoveComponents(SerializeEntityID, uint[])

void RemoveComponents(SerializeEntityID id, uint[] data)

Parameters

id SerializeEntityID
data uint[]

SendAdoptOrphanRequest(SerializeEntityID)

void SendAdoptOrphanRequest(SerializeEntityID id)

Parameters

id SerializeEntityID

SendAuthorityRequest(SerializeEntityID, AuthorityType)

void SendAuthorityRequest(SerializeEntityID id, AuthorityType authorityMode = AuthorityType.Full)

Parameters

id SerializeEntityID
authorityMode AuthorityType

SendAuthorityTransfer(SerializeEntityID, ClientID, bool, AuthorityType)

bool SendAuthorityTransfer(SerializeEntityID id, ClientID newAuthority, bool authorized, AuthorityType authorityType = AuthorityType.Full)

Parameters

id SerializeEntityID
newAuthority ClientID
authorized bool
authorityType AuthorityType

Returns

bool

SendCommand(IEntityCommand, MessageTarget, SerializeEntityID)

void SendCommand(IEntityCommand message, MessageTarget target, SerializeEntityID id)

Parameters

message IEntityCommand
target MessageTarget
id SerializeEntityID

SendInput(IEntityInput, long, SerializeEntityID)

void SendInput(IEntityInput message, long frame, SerializeEntityID id)

Parameters

message IEntityInput
frame long
id SerializeEntityID

SetFloatingOrigin(Vector3d)

void SetFloatingOrigin(Vector3d newFloatingOrigin)

Parameters

newFloatingOrigin Vector3d

SetTransportFactory(ITransportFactory)

void SetTransportFactory(ITransportFactory transportFactory)

Parameters

transportFactory ITransportFactory

UpdateComponents(SerializeEntityID, ICoherenceComponentData[], uint[])

void UpdateComponents(SerializeEntityID id, ICoherenceComponentData[] data, uint[] mask)

Parameters

id SerializeEntityID
data ICoherenceComponentData[]
mask uint[]

UpdateReceiving()

void UpdateReceiving()

UpdateSending()

void UpdateSending()

Events

DebugOnPacketSent

event Action<Dictionary<SerializeEntityID, EntityState>> DebugOnPacketSent

Event Type

Action<Dictionary<SerializeEntityID, EntityState>>

OnAuthorityChange

event Action<AuthorityChange> OnAuthorityChange

Event Type

Action<AuthorityChange>

OnAuthorityRequestRejected

event Action<AuthorityRequestRejection> OnAuthorityRequestRejected

Event Type

Action<AuthorityRequestRejection>

OnAuthorityRequested

event Action<AuthorityRequest> OnAuthorityRequested

Event Type

Action<AuthorityRequest>

OnCommand

event Action<IEntityCommand, MessageTarget, SerializeEntityID> OnCommand

Event Type

Action<IEntityCommand, MessageTarget, SerializeEntityID>

OnConnected

event Action<ClientID> OnConnected

Event Type

Action<ClientID>

OnConnectedEndpoint

event Action<EndpointData> OnConnectedEndpoint

Event Type

Action<EndpointData>

OnConnectionError

event Action<ConnectionException> OnConnectionError

Event Type

Action<ConnectionException>

OnDisconnected

event Action<ConnectionCloseReason> OnDisconnected

Event Type

Action<ConnectionCloseReason>

OnEntityCreated

event Action<SerializeEntityID, EntityUpdate> OnEntityCreated

Event Type

Action<SerializeEntityID, EntityUpdate>

OnEntityDestroyed

event Action<SerializeEntityID, DestroyReason> OnEntityDestroyed

Event Type

Action<SerializeEntityID, DestroyReason>

OnEntityUpdated

event Action<SerializeEntityID, EntityUpdate> OnEntityUpdated

Event Type

Action<SerializeEntityID, EntityUpdate>

OnInput

event Action<IEntityInput, long, SerializeEntityID> OnInput

Event Type

Action<IEntityInput, long, SerializeEntityID>