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

INetworkTime NetworkTime { get; }

Property Value

INetworkTime

Ping

Ping Ping { get; }

Property Value

Ping

SendFrequency

byte SendFrequency { get; }

Property Value

byte

Stats

Stats Stats { get; }

Property Value

Stats

Methods

CanSendUpdates(Entity)

bool CanSendUpdates(Entity id)

Parameters

id Entity

Returns

bool

Connect(EndpointData, ConnectionSettings, ConnectionType)

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

Parameters

data EndpointData
connectionSettings ConnectionSettings
connectionType ConnectionType

CreateEntity(ICoherenceComponentData[], bool)

Entity CreateEntity(ICoherenceComponentData[] data, bool orphan)

Parameters

data ICoherenceComponentData[]
orphan bool

Returns

Entity

DebugDropNextOutPacket(Action)

void DebugDropNextOutPacket(Action callback)

Parameters

callback Action

DebugHoldAllPackets(bool)

void DebugHoldAllPackets(bool hold)

Parameters

hold bool

DebugOnNextPacketSentOneShot(Action)

void DebugOnNextPacketSentOneShot(Action callback)

Parameters

callback Action

DebugReleaseAllHeldPackets()

void DebugReleaseAllHeldPackets()

DebugSetNetworkCondition(Condition)

void DebugSetNetworkCondition(Condition condition)

Parameters

condition Condition

DebugStopSerializingUpdates(bool)

void DebugStopSerializingUpdates(bool stop)

Parameters

stop bool

DestroyEntity(Entity)

void DestroyEntity(Entity id)

Parameters

id Entity

Disconnect()

void Disconnect()

EntityExists(Entity)

bool EntityExists(Entity id)

Parameters

id Entity

Returns

bool

GetFloatingOrigin()

Vector3d GetFloatingOrigin()

Returns

Vector3d

HasAuthorityOverEntity(Entity, AuthorityType)

bool HasAuthorityOverEntity(Entity entity, AuthorityType authorityType)

Parameters

entity Entity
authorityType AuthorityType

Returns

bool

IsConnected()

bool IsConnected()

Returns

bool

IsConnecting()

bool IsConnecting()

Returns

bool

IsDisconnected()

bool IsDisconnected()

Returns

bool

IsEntityInAuthTransfer(Entity)

bool IsEntityInAuthTransfer(Entity id)

Parameters

id Entity

Returns

bool

Reconnect()

void Reconnect()

RemoveComponents(Entity, uint[])

void RemoveComponents(Entity id, uint[] data)

Parameters

id Entity
data uint[]

SendAdoptOrphanRequest(Entity)

void SendAdoptOrphanRequest(Entity id)

Parameters

id Entity

SendAuthorityRequest(Entity, AuthorityType)

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

Parameters

id Entity
authorityMode AuthorityType

SendAuthorityTransfer(Entity, ClientID, bool, AuthorityType)

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

Parameters

id Entity
newAuthority ClientID
authorized bool
authorityType AuthorityType

Returns

bool

SendCommand(IEntityCommand, MessageTarget, Entity)

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

Parameters

message IEntityCommand
target MessageTarget
id Entity

SendInput(IEntityInput, long, Entity)

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

Parameters

message IEntityInput
frame long
id Entity

SetFloatingOrigin(Vector3d)

void SetFloatingOrigin(Vector3d newFloatingOrigin)

Parameters

newFloatingOrigin Vector3d

SetTransportFactory(ITransportFactory)

void SetTransportFactory(ITransportFactory transportFactory)

Parameters

transportFactory ITransportFactory

UpdateComponents(Entity, ICoherenceComponentData[])

void UpdateComponents(Entity id, ICoherenceComponentData[] data)

Parameters

id Entity
data ICoherenceComponentData[]

UpdateReceiving()

void UpdateReceiving()

UpdateSending()

void UpdateSending()

Events

DebugOnEntityAcked

event Action<Entity> DebugOnEntityAcked

Event Type

Action<Entity>

DebugOnPacketReceived

event Action<int> DebugOnPacketReceived

Event Type

Action<int>

DebugOnPacketSent

event Action<PacketSentDebugInfo> DebugOnPacketSent

Event Type

Action<PacketSentDebugInfo>

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>

OnAuthorityTransferred

event Action<Entity> OnAuthorityTransferred

Event Type

Action<Entity>

OnCommand

event Action<IEntityCommand, MessageTarget, Entity> OnCommand

Event Type

Action<IEntityCommand, MessageTarget, Entity>

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<Entity, IncomingEntityUpdate> OnEntityCreated

Event Type

Action<Entity, IncomingEntityUpdate>

OnEntityDestroyed

event Action<Entity, DestroyReason> OnEntityDestroyed

Event Type

Action<Entity, DestroyReason>

OnEntityUpdated

event Action<Entity, IncomingEntityUpdate> OnEntityUpdated

Event Type

Action<Entity, IncomingEntityUpdate>

OnInput

event Action<IEntityInput, long, Entity> OnInput

Event Type

Action<IEntityInput, long, Entity>

OnSceneIndexChanged

event Action<SceneIndexChanged> OnSceneIndexChanged

Event Type

Action<SceneIndexChanged>