Sites

Menu

C# bindings API reference documentation

Table of contents

Improbable namespace

Nested namespaces Improbable.Worker

Improbable.Worker namespace

Nested namespaces Improbable.Worker.CInterop

Improbable.Worker.CInterop namespace

Summary The Improbable.Worker.CInterop namespace contains the APIs you can use to build a worker.
Nested namespaces Improbable.Worker.CInterop.Alpha, Improbable.Worker.CInterop.Query

Delegates

unsafe delegate void CommandRequestFree(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate void CommandResponseFree(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate void ComponentDataFree(ComponentId componentId, UIntPtr userData, UIntPtr handle)

unsafe delegate void ComponentUpdateFree(ComponentId componentId, UIntPtr userData, UIntPtr handle)

unsafe delegate UIntPtr CommandRequestCopy(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate UIntPtr CommandResponseCopy(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate UIntPtr ComponentDataCopy(ComponentId componentId, UIntPtr userData, UIntPtr handle)

unsafe delegate UIntPtr ComponentUpdateCopy(ComponentId componentId, UIntPtr userData, UIntPtr handle)

unsafe delegate bool CommandRequestDeserialize(ComponentId componentId, uint commandIndex, UIntPtr userData, SchemaCommandRequest source, out UIntPtr handleOut)

unsafe delegate bool CommandResponseDeserialize(ComponentId componentId, uint commandIndex, UIntPtr userData, SchemaCommandResponse source, out UIntPtr handleOut)

unsafe delegate bool ComponentDataDeserialize(ComponentId componentId, UIntPtr userData, SchemaComponentData source, out UIntPtr handleOut)

unsafe delegate bool ComponentUpdateDeserialize(ComponentId componentId, UIntPtr userData, SchemaComponentUpdate source, out UIntPtr handleOut)

unsafe delegate SchemaCommandRequest? CommandRequestSerialize(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate SchemaCommandResponse? CommandResponseSerialize(ComponentId componentId, uint commandIndex, UIntPtr userData, UIntPtr handle)

unsafe delegate SchemaComponentData? ComponentDataSerialize(ComponentId componentId, UIntPtr userData, UIntPtr handle)

unsafe delegate SchemaComponentUpdate? ComponentUpdateSerialize(ComponentId componentId, UIntPtr userData, UIntPtr handle)

Improbable.Worker.CInterop.AddComponentOp struct

Summary Data for an operation that indicates a component has been added to an existing entity in the worker’s view of the simulation.

Fields and Properties

Improbable.Worker.CInterop.AddEntityOp struct

Summary Data for an operation that indicates an entity has been added to the worker’s view of the simulation.

Fields and Properties

  • System.Int64 EntityId - The ID of the entity that was added to the worker’s view of the simulation.

Improbable.Worker.CInterop.Authority enum

Summary Enumerates the possible states of an AuthorityChangeOp. Authoritative and NotAuthoritative are used to indicate the worker has gained or lost authority (respectively) over a particular component for an entity. AuthorityLossImminent is only used when the component has an authority handover timeout set, and indicates the worker will soon lose authority soon over a particular component for an entity. In this case, the worker may save any transient state by sending a final update for the component, and call SendAuthorityLossImminentAcknowledgement to proceed with authority handover. Note that this should only be used for optimization purposes, and workers must still be able to recover in case the final update is not successful. In general, there is no guarantee that a worker will receive the authority loss imminent notification in time to send a final update.

Fields

Improbable.Worker.CInterop.AuthorityChangeOp struct

Summary Data for an operation that indicates the worker’s authority over a component for an entity has been changed.

Fields and Properties

  • AuthorityAuthority

  • uint ComponentId

  • System.Int64 EntityId

Improbable.Worker.CInterop.CommandParameters class

Summary Command parameters. Used to modify the behavior of a command request.

Fields and Properties

  • bool AllowShortCircuit - Allow command requests to bypass the bridge when this worker is authoritative over the target entity-component.

Improbable.Worker.CInterop.CommandRequest struct

Summary Represents a command request for a component identified by the ComponentId. Underlying binary data format can be either raw SchemaData or UserHandle controlled entirely by user.

Fields and Properties

Constructors

CommandRequest(uint componentId, uint commandIndex, SchemaCommandRequest schemaData)

Parameters:

CommandRequest(uint componentId, uint commandIndex, System.UIntPtr userHandle)

Parameters:

  • uint componentId
  • uint commandIndex
  • System.UIntPtr userHandle

Methods

  • Acquire

    CommandRequest Acquire()
    

    Description: Acquire a reference to extend the lifetime of a command request managed by the SDK, by returning a new command request container object not managed by the SDK. The data contained within the object will be identical to the original data, but it is not safe to mutate the contained data without explicitly copying it first. The lifetime of the original container object is unchanged. You must call Release() on the new object once you are done using it, otherwise memory will leak.
    Returns: CommandRequest

    • Release
    void Release()
    

    Description: Releases an object returned after calling Acquire()
    Returns: void

Improbable.Worker.CInterop.CommandRequestOp struct

Summary Data for an operation that indicates a command request has been received for a component on an entity over which this worker has authority.
Remarks The worker should respond to the command by calling SendCommandResponse with the given request ID.

Fields and Properties

  • System.Collections.Generic.List<string> CallerAttributeSet - The attribute set of the worker that initiated this request.

  • string CallerWorkerId - The ID of the worker that initiated this request.

  • System.Int64 EntityId - The ID of the target entity of this request.

  • CommandRequestRequest - The request data.

  • System.Int64 RequestId - The incoming request ID.
    Should be passed to SendCommandResponse in order to respond to this request.

  • uint TimeoutMillis - An upper bound on the timeout of this request. Any response sent after the timeout has expired will be ignored by the SDK.

Improbable.Worker.CInterop.CommandResponse struct

Summary Represents a command response for a component identified by the ComponentId. Underlying binary data format can be either raw SchemaData or UserHandle controlled entirely by user.

Fields and Properties

Constructors

CommandResponse(uint componentId, uint commandIndex, SchemaCommandResponse schemaData)

Parameters:

CommandResponse(uint componentId, uint commandIndex, System.UIntPtr userHandle)

Parameters:

  • uint componentId
  • uint commandIndex
  • System.UIntPtr userHandle

Methods

  • Acquire

    CommandResponse Acquire()
    

    Description: Acquire a reference to extend the lifetime of a command response managed by the SDK, by returning a new command response container object not managed by the SDK. The data contained within the object will be identical to the original data, but it is not safe to mutate the contained data without explicitly copying it first. The lifetime of the original container object is unchanged. You must call Release() on the new object once you are done using it, otherwise memory will leak.
    Returns: CommandResponse

    • Release
    void Release()
    

    Description: Releases an object returned after calling Acquire()
    Returns: void

Improbable.Worker.CInterop.CommandResponseOp struct

Summary Data for an operation that indicates a command response has been received for a request previously issued by this worker.
Remarks The request ID will match a previous call to SendCommandRequest.

Fields and Properties

  • System.Int64 EntityId - The target entity ID of the original request.

  • string Message - A description of the status. Will contain the reason for failure if unsuccessful.

  • System.Int64 RequestId - The outgoing request ID for which there was a reponse.
    Matches the request ID returned by a previous call to SendCommandRequest.

  • CommandResponseResponse - The command response data. Present exactly when the status code is Success.

  • StatusCodeStatusCode - The status code of the command response.

Improbable.Worker.CInterop.ComponentData struct

Summary Represents data-at-rest for a component identified by the ComponentId. Underlying binary data format can be either raw SchemaData or UserHandle controlled entirely by user.

Fields and Properties

Constructors

ComponentData(uint componentId, SchemaComponentData schemaData)

Parameters:

ComponentData(uint componentId, System.UIntPtr userHandle)

Parameters:

  • uint componentId
  • System.UIntPtr userHandle

Methods

  • Acquire

    ComponentData Acquire()
    

    Description: Acquire a reference to extend the lifetime of some component data managed by the SDK, by returning a new component data container object not managed by the SDK. The data contained within the object will be identical to the original data, but it is not safe to mutate the contained data without explicitly copying it first. The lifetime of the original container object is unchanged. You must call Release() on the new object once you are done using it, otherwise memory will leak.
    Returns: ComponentData

    • Release
    void Release()
    

    Description: Releases an object returned after calling Acquire()
    Returns: void

Improbable.Worker.CInterop.ComponentUpdate struct

Summary Represents an update for the component identified by the ComponentId. Underlying binary data format can be either raw SchemaData or some UserHandle controlled entirely by user.

Fields and Properties

Constructors

ComponentUpdate(uint componentId, SchemaComponentUpdate schemaData)

Parameters:

ComponentUpdate(uint componentId, System.UIntPtr userHandle)

Parameters:

  • uint componentId
  • System.UIntPtr userHandle

Methods

  • Acquire

    ComponentUpdate Acquire()
    

    Description: Acquire a reference to extend the lifetime of some component update managed by the SDK, by returning a new component update container object not managed by the SDK. The data contained within the object will be identical to the original data, but it is not safe to mutate the contained data without explicitly copying it first. The lifetime of the original container object is unchanged. You must call Release() on the new object once you are done using it, otherwise memory will leak.
    Returns: ComponentUpdate

    • Release
    void Release()
    

    Description: Releases an object returned after calling Acquire()
    Returns: void

Improbable.Worker.CInterop.ComponentUpdateLoopback enum

Summary Component update loopback describes how the component update is delivered to the worker sending the update, if at all.

Fields

  • ComponentUpdateLoopbackNone - The update is not delivered to the worker sending the update.

  • ComponentUpdateLoopbackShortCircuited - The update is locally added to the op list of, and therefore received by, the worker sending the update.

Improbable.Worker.CInterop.ComponentUpdateOp struct

Summary Data for an operation that indicates the component for an entity has been updated.

Fields and Properties

Improbable.Worker.CInterop.ComponentVtable class

Summary Acts as a container of function callbacks which are called by the network threads when component data needs to be serialized or deserialized. You should ensure that no exceptions are thrown from any of these callbacks, as this can cause a crash in the native thread.

Fields and Properties

Improbable.Worker.CInterop.CompressionParameters struct

Summary Parameters for configuring compression. Used by ModularKcpNetworkParameters and ModularTcpNetworkParameters.
Remarks Currently, there are no configurable settings.

Improbable.Worker.CInterop.Connection class

Implements System.IDisposable
Summary Worker Connection API. This is the main way of connecting to SpatialOS, processing operations, sending component updates etc.
Remarks This object should not be used concurrently by multiple threads.

Fields and Properties

  • bool IsConnected { get; } - Returns true if the Connection object was created correctly and has successfully connected to SpatialOS.
    DEPRECATED: Equivalent to GetConnectionStatusCode () == ConnectionStatusCode::kSuccess.

Methods

  • AlphaFlush

    void AlphaFlush()
    

    Description: Indicates to the network layer that all previous invocations of the Connection.Send* methods should be flushed to the network as soon as possible. A common usage pattern is to call this function after all state changes have been applied at the end of a frame.
    Remarks: This method is asynchronous. In particular, calling is an indication that a flush is wanted, and can return before messages are fully serialized and put on the network. This currently only has an effect if using the Worker_Alpha_ModularUdpNetworkParameters.
    Returns: void

    • ConnectAsync
    static Future<Connection> ConnectAsync(string hostname, uint port, string workerId, ConnectionParameters connectionParams)
    

    Description: Connects to a SpatialOS deployment via a receptionist. This is the flow used to connect a managed worker running in the cloud alongside the deployment, and also to connect any local worker to a (local or remote) deployment via a locally-running receptionist.
    Remarks: The hostname and port would typically be provided by SpatialOS on the command-line, if this is a managed worker on the cloud, or otherwise be predetermined (e.g. localhost:7777 for the default receptionist of a locally-running deployment).
    Parameters:

    • string hostname
    • uint port
    • string workerId
    • ConnectionParametersconnectionParams - Parameters controlling the connection to SpatialOS.

    Returns: Future<Connection>

  • DisableLogging

    void DisableLogging()
    

    Description: Disables all logging. If logging was already disabled or no logsinks had been configured during connecting, does nothing.
    Returns: void

    • Dispose
    void Dispose()
    

    Returns: void

  • EnableLogging

    void EnableLogging()
    

    Description: Reenables all logging. If logging was already enabled or no logsinks had been configured during connecting, does nothing.
    Returns: void

    • GetConnectionStatusCode
    ConnectionStatusCode GetConnectionStatusCode()
    

    Returns: ConnectionStatusCode - Returns kSuccess if the Connection object if the Connection is connected and usable, otherwise a value indicating the type of error that occurred.

  • GetConnectionStatusDetailString

    string GetConnectionStatusDetailString()
    

    Returns: string - Returns a string containing more detailed information about the connection status.

    • GetOpList
    OpList GetOpList(uint timeoutMillis)
    

    Description: Retrieves the list of operations that have occurred since the last call to this function.
    Parameters:

    • uint timeoutMillis - If non-zero, the function will block until there is at least one operation to return, or the timeout has been exceeded. If the timeout is exceeded, an empty list will be returned. If timeoutMillis is zero, the function is non-blocking.

    Returns: OpList

  • GetWorkerAttributes

    System.Collections.Generic.List<string> GetWorkerAttributes()
    

    Description: Returns the list of attributes that have been assigned to the worker by SpatialOS.
    Remarks: Worker attributes are static and will not change over the lifetime of the connection.
    Returns: System.Collections.Generic.List<string> - The list of attributes of the worker as assigned by the SpatialOS runtime when the worker connects.

    • GetWorkerFlag
    string GetWorkerFlag(string flagName)
    

    Description: Retrieves the value of a worker flag.
    Remarks: Worker flags are remotely configurable and may change during the runtime of the worker, including addition and deletion.
    Parameters:

    • string flagName - The name of the worker flag to retrieve.

    Returns: string - The value of the worker flag with the given name. If no such worker flag exists, an empty option is returned.

  • GetWorkerId

    string GetWorkerId()
    

    Description: Returns the ID of the worker as assigned by SpatialOS.
    Remarks: A worker ID is static and will not change over the lifetime of the connection.
    Returns: string - The ID of the worker as assigned by the SpatialOS runtime when the worker connects.

    • SendAddComponent
    void SendAddComponent(System.Int64 entityId, ComponentData data, UpdateParameters? parameters = null)
    

    Description: Adds a new component to the given entity in SpatialOS.
    Remarks: The behaviour is undefined if the component is mutated after it is sent; use SendAddComponent(data.DeepCopy()) if you intend to hold on to the data and modify it later. This method does not check whether the worker has authority over the component, you must make sure the worker has authority in order to add the component. In order to use this method, ConnectionParameters.EnableDynamicComponents must be set to true.
    Parameters:

    Returns: void

  • SendAuthorityLossImminentAcknowledgement

    void SendAuthorityLossImminentAcknowledgement(System.Int64 entityId, uint componentId)
    

    Description: Sends an acknowledgement of the receipt of an AuthorityLossImminent authority change for a component.
    Remarks: Sending the acknowledgement signifies that this worker is ready to lose authority over the component for the given entity.
    Parameters:

    • System.Int64 entityId
    • uint componentId

    Returns: void

    • SendCommandFailure
    void SendCommandFailure(System.Int64 requestId, string message)
    

    Description: Explicitly fails an incoming command request for a component on an entity over which this worker has authority.
    Remarks: The calling worker will receive a command response with status code ApplicationError.
    Parameters:

    • System.Int64 requestId
    • string message

    Returns: void

  • SendCommandRequest

    System.Int64 SendCommandRequest(System.Int64 entityId, CommandRequest request, uint? timeoutMillis, CommandParameters? parameters = null)
    

    Description: Sends a command request to a component on a specific target entity.
    Remarks: If timeoutMillis is not specified, the default timeout will be used. Like SendComponentUpdate, the behaviour is undefined if the request is mutated after it is sent; SendCommandRequest(request.DeepCopy()) if you intend to modify the object later.
    Parameters:

    • System.Int64 entityId
    • CommandRequestrequest
    • uint? timeoutMillis - If not specified, the default timeout will be used.
    • CommandParameters?parameters = null - Parameters used to alter the behavior of this request.

    Returns: System.Int64

    • SendCommandResponse
    System.Int64 SendCommandResponse(System.Int64 requestId, CommandResponse response)
    

    Description: Sends a response to an incoming command request for a component on an entity over which this worker has authority.
    Remarks: Like SendComponentUpdate, the behaviour is undefined if the response is mutated after it is sent; SendCommandResponse(response.DeepCopy()) if you intend to modify the object later.
    Parameters:

    Returns: System.Int64

  • SendComponentInterest

    void SendComponentInterest(System.Int64 entityId, System.Collections.Generic.Dictionary<uint, InterestOverride> interestOverrides)
    

    Description: Sends a component interest update for the given entity to SpatialOS. By default, the worker receives data for all entities according to the default component interests specified in its bridge settings. This function overrides the default to explicitly add or remove interest for particular components.
    Remarks: Interest for components not present in the interestOverrides map is unaffected. Note also that components over which the worker is authoritative are always received, regardless of interest settings.
    Parameters:

    • System.Int64 entityId
    • System.Collections.Generic.Dictionary<uint, InterestOverride> interestOverrides

    Returns: void

    • SendComponentUpdate
    void SendComponentUpdate(System.Int64 entityId, ComponentUpdate update, UpdateParameters? parameters = null)
    

    Description: Sends an update for an entity’s component to SpatialOS. Note that the sent component update is added as an operation to the operation list and will be returned by a subsequent call to GetOpList unless Loopback is set to None.
    Remarks: The behaviour is undefined if the update is mutated after it is sent; use SendComponentUpdate(update.DeepCopy()) if you intend to hold on to the update and modify it later.
    Parameters:

    Returns: void

  • SendCreateEntityRequest

    System.Int64 SendCreateEntityRequest(Entity entity, System.Int64? entityId, uint? timeoutMillis)
    

    Description: Requests SpatialOS to create an entity.
    Remarks: The provided entity data is copied and can subsequently be reused by the caller.
    Parameters:

    • Entityentity - The entity to be created.
    • System.Int64? entityId - If provided, it must have been reserved using SendReserveEntityIdsRequest, however we do not recommend using a reserved entity ID. We recommend that you avoid specify an entity ID when creating an entity and instead use the automatically assigned entity ID contained in CreateEntityResponseOp.
    • uint? timeoutMillis - If not specified, the default timeout will be used.

    Returns: System.Int64

    • SendDeleteEntityRequest
    System.Int64 SendDeleteEntityRequest(System.Int64 entityId, uint? timeoutMillis)
    

    Description: Requests SpatialOS to delete an entity.
    Parameters:

    • System.Int64 entityId
    • uint? timeoutMillis - If not specified, the default timeout will be used.

    Returns: System.Int64

  • SendEntityQueryRequest

    System.Int64 SendEntityQueryRequest(EntityQuery entityQuery, uint? timeoutMillis)
    

    Description: Queries SpatialOS for remote entity data.
    Parameters:

    • EntityQueryentityQuery
    • uint? timeoutMillis - If not specified, the default timeout will be used.

    Returns: System.Int64

    • SendLogMessage
    void SendLogMessage(LogLevel level, string loggerName, string message, System.Int64? entityId = null)
    

    Description: Sends a log message for the worker to SpatialOS.
    Parameters:

    • LogLevellevel
    • string loggerName
    • string message
    • System.Int64? entityId = null

    Returns: void

  • SendMetrics

    void SendMetrics(Metrics metrics)
    

    Description: Sends a set of metrics for the worker to SpatialOS. Since histogram metrics are diff-based, calling this function clears each histogram in the Metrics parameter.
    Parameters:

    Returns: void

    • SendRemoveComponent
    void SendRemoveComponent(System.Int64 entityId, uint componentId, UpdateParameters? parameters = null)
    

    Description: Removes a component from the given entity in SpatialOS.
    Remarks: This function does not check whether the worker currently has authority over the component, you must make sure the worker has authority in order to remove the component. In order to use this function, EnableDynamicComponents must be set to true. Note that the sent remove component is added as an operation to the operation list and will be returned by a subsequent call to GetOpList unless Loopback is set to None.
    Parameters:

    Returns: void

  • SendReserveEntityIdsRequest

    System.Int64 SendReserveEntityIdsRequest(uint numberOfEntityIds, uint? timeoutMillis)
    

    Description: Requests SpatialOS to reserve multiple entity IDs.
    Remarks: We do not recommend reserving entity IDs. Instead, we recommend using SendCreateEntityRequest without specifying an entity ID. You can then use the automatically assigned entity ID provided in CreateEntityResponseOp.
    Parameters:

    • uint numberOfEntityIds
    • uint? timeoutMillis - If not specified, the default timeout will be used.

    Returns: System.Int64

    • SetProtocolLoggingEnabled
    void SetProtocolLoggingEnabled(bool enable)
    

    Description: Enables or disables protocol logging. Logging uses the parameters specified when the Connection was created. Enabling it when already enabled, or disabling it when already disabled, do nothing.
    Remarks: Note that logs from any previous protocol logging sessions are overwritten. We have deprecated this function and will remove it in a future version of SpatialOS.
    Parameters:

    • bool enable

    Returns: void

Improbable.Worker.CInterop.ConnectionParameters class

Summary Parameters for creating a Connection and connecting to SpatialOS.

Fields and Properties

  • uint BuiltInMetricsReportPeriodMillis =BuiltInMetricsReportPeriodMillis - The Connection tracks several internal metrics, such as send and receive queue statistics. This parameter controls how frequently the Connection will return a MetricsOp reporting its built-in metrics. This is the same as the period at which the built-in metrics are sent to SpatialOS. If set to zero, this functionality is disabled.

  • System.Collections.Generic.Dictionary<uint, ComponentVtable> ComponentVtables - Vtables used by the connection when saving and reading snapshots. Separate behavior can be specified per component type, per handle type (data, update, command request, response) and per direction (serialization, deserialization).

  • ComponentVtableDefaultComponentVtable - The default vtable used by Connection when there’s no component-specific vtable specified.

  • bool EnableDynamicComponents =EnableDynamicComponents - Whether to enable the dynamic components feature. If this field is true, add and remove component ops are emitted on authority change, i.e. where you would previously receive a component update prior to gaining authority or after losing authority, you will now receiving an add component (if the component exists) or a remove component (if the component does not exist). These ops, like all add and remove component ops, must be treated in an idempotent way (i.e. they replace any existing value on the worker for the component).

  • bool EnableLoggingAtStartup =EnableLoggingAtStartup - Whether to enable all logsinks at startup. Note that this is automatically true if EnableProtocolLoggingAtStartup is set to true.

  • bool EnableProtocolLoggingAtStartup = false - Whether to enable protocol logging at startup.
    We have deprecated this field and will remove it in a future version of SpatialOS.

  • uint LogMessageQueueCapacity =LogMessageQueueCapacity - Number of messages logged by the SDK that can be stored in the log message queue. When the log message queue is full, messages logged by the SDK can be dropped.

  • System.Collections.Generic.List<LogsinkParameters> Logsinks - List of logsinks that receive filtered log messages from the SDK.

  • NetworkParametersNetwork - Parameters controlling the network connection to SpatialOS.

  • ProtocolLoggingParametersProtocolLogging - Parameters for configuring protocol logging.
    We have deprecated this field and will remove it in a future version of SpatialOS.

  • uint ReceiveQueueCapacity =ReceiveQueueCapacity - Number of messages that can be stored on the receive queue. When the receive queue is full, SpatialOS can apply QoS and drop messages to the worker.

  • uint SendQueueCapacity =SendQueueCapacity - Number of messages that can be stored on the send queue. When the send queue is full, calls to Connection Send functions can block.

  • ThreadAffinityParametersThreadAffinity - Parameters for configuring thread affinity.

  • string WorkerType - Worker type (platform).

Improbable.Worker.CInterop.ConnectionStatus struct

Summary Information about the status of a network request.

Fields and Properties

  • ConnectionStatusCodeCode - The status of the request.

  • string Detail - Detailed, human readable description of the connection status. Will be “OK” if no error occurred.

Methods

  • ToString

    string ToString()
    

    Returns: string

    Improbable.Worker.CInterop.ConnectionStatusCode enum

    Summary Possible status codes for a remote call, connection attempt or connection migration attempt.

    Fields

    • ConnectionStatusCodeCancelled - Attempt was cancelled by the caller. Currently shouldn’t happen; reserved for future use.

    • ConnectionStatusCodeCapacityExceeded - Failed because the deployment associated with the provided login token was at capacity. Retryable.

    • ConnectionStatusCodeInternalError - Protocol violation, or some part of the system otherwise behaved in an unexpected way. Not expected to occur in normal operation.

    • ConnectionStatusCodeInvalidArgument - An argument provided by the caller was determined to be invalid. This is a local failure; no actual attempt was made to contact the host. Not retryable.

    • ConnectionStatusCodeLoginTokenExpired - The login token provided by the caller has expired. Generate a new one and retry.

    • ConnectionStatusCodeNetworkError - Failed due to a networking issue or otherwise unreachable host.

    • ConnectionStatusCodePlayerIdentityTokenExpired - The player identity token provided by the caller has expired. Generate a new one and retry.

    • ConnectionStatusCodeRateExceeded - Failed due to rate-limiting of new connections to the deployment associated with the provided login token. Retryable.

    • ConnectionStatusCodeRejected - Made contact with the host, but the request was explicitly rejected. Unlikely to be retryable. Possible causes include: the request was made to the wrong host; the host considered the request invalid for some othe reason.

    • ConnectionStatusCodeServerShutdown - After a successful connection attempt, the server later explicitly terminated the connection. Possible causes include: the deployment was stopped; the worker was killed due to unresponsiveness.

    • ConnectionStatusCodeSuccess - The remote call was successful, or we are successfully connected.

    • ConnectionStatusCodeTimeout - A timeout provided by the caller or enforced by the system was exceeded. Can be retried.

    Improbable.Worker.CInterop.CreateEntityResponseOp struct

    Summary A response indicating the result of an entity creation request.

    Fields and Properties

    • System.Int64? EntityId - If successful, the entity ID of the newly created entity.

    • string Message - A description of the status. Will contain the reason for failure if unsuccessful.

    • System.Int64 RequestId - The outgoing request ID for which there was a response.
      Matches the request ID returned by a previous call to SendCreateEntityRequest.

    • StatusCodeStatusCode - The status code of the response.
      If the status code is ApplicationError, the entity ID reservation has expired and must be retried.

    Improbable.Worker.CInterop.CriticalSectionOp struct

    Summary Data for an operation that indicates the message stream received by the worker is entering or leaving a critical section.
    Remarks Nested critical sections are currently not supported by the protocol.

    Fields and Properties

    • bool InCriticalSection

    Improbable.Worker.CInterop.Defaults class

    Summary Default values for various configuration parameters.

    Fields and Properties

    • uint BuiltInMetricsReportPeriodMillis = 5000

    • uint DefaultCommandTimeoutMillis = 5000

    • LogCategoryDefaultLogCategories = LogCategory.All

    • LogLevelDefaultLogLevel = LogCategory.Info

    • LogsinkTypeDefaultLogsinkType = LogsinkType.RotatingFile

    • bool EnableDynamicComponents = false

    • bool EnableLoggingAtStartup = false

    • byte ErasureCodecOriginalPacketCount = 10

    • byte ErasureCodecRecoveryPacketCount = 2

    • byte ErasureCodecWindowSize = 16

    • ulong HeartbeatIntervalMillis = 10000

    • ulong HeartbeatTimeoutMillis = 60000

    • bool KcpEarlyRetransmission = true

    • bool KcpEnableErasureCodec = false

    • bool KcpFastRetransmission = true

    • uint KcpMinRtoMillis = 10

    • uint KcpMultiplexLevel = 2

    • bool KcpNonConcessionalFlowControl = true

    • uint KcpRecvWindowSize = 1000

    • uint KcpSendWindowSize = 500

    • uint KcpUpdateIntervalMillis = 10

    • uint LogMessageQueueCapacity = 256

    • string LogPrefix = protocol-log-

    • uint MaxLogFileSizeBytes = 1024 * 1024

    • uint MaxLogFiles = 10

    • byte ModularTcpMultiplexLevel = 1

    • uint RakNetHeartbeatTimeoutMillis = 60000

    • uint ReceiveQueueCapacity = 4096

    • uint SendQueueCapacity = 4096

    • uint TcpFlushDelayMillis = 1

    • bool TcpNoDelay = false

    • uint TcpReceiveBufferSize = 65536

    • uint TcpSendBufferSize = 65536

    • bool UseExternalIp = false

    Improbable.Worker.CInterop.DeleteEntityResponseOp struct

    Summary A response indicating the result of an entity deletion request.

    Fields and Properties

    • System.Int64 EntityId - The ID of the target entity of this request.

    • string Message - A description of the status. Will contain the reason for failure if unsuccessful.

    • System.Int64 RequestId - The outgoing request ID for which there was a response.
      Matches the request ID returned by a previous call to SendDeleteEntityRequest.

    • StatusCodeStatusCode - The status code of the response.

    Improbable.Worker.CInterop.Deployment struct

    Summary Details for a specific deployment obtained via GetDeploymentListAsync.

    Fields and Properties

    • string AssemblyName - The name of the assembly used by this deployment.

    • string DeploymentName - The name of the deployment.

    • string Description - Description of this deployment.

    • uint UsersCapacity - Total user capacity of the deployment.

    • uint UsersConnected - Number of users currently connected to the deployment.

    Improbable.Worker.CInterop.DeploymentList struct

    Summary A deployment list obtained via GetDeploymentListAsync.

    Fields and Properties

    • System.Collections.Generic.List<Deployment> Deployments - List of accessible deployments for the given project.

    • string Error - Will be non-null if an error occurred.

    Improbable.Worker.CInterop.DisconnectOp struct

    Summary Data for an operation that indicates the Connection has disconnected and can no longer be used

    Fields and Properties

    Improbable.Worker.CInterop.Entity class

    Summary Stores the complete data for an entity’s components. This is used both for representing the initial set of components for an entity by the AddEntity operation, and inside the (optional) View.
    Remarks Note that an Entity object is simply a local data structure, and changes made here are not automatically reflected across the SpatialOS simulation. To synchronize component state with SpatialOS, use SendComponentUpdate. This object should not be modified concurrently by multiple threads.

    Methods

    • Add
    void Add(ComponentData data)
    

    Description: Creates the given component by copying the provided initial data. Has no effect if the entity already has the given component.
    Parameters:

    Returns: void

  • Get

    ComponentData? Get(uint componentId)
    

    Description: Retrieves data for the given component. Returns an empty option if the entity does not have the given component.
    Parameters:

    • uint componentId

    Returns: ComponentData?

    • GetComponentIds
    System.Collections.Generic.Dictionary<uint, ComponentData>.KeyCollection GetComponentIds()
    

    Description: Returns a list of the component IDs of the components present in this entity.
    Returns: System.Collections.Generic.Dictionary<uint, ComponentData>.KeyCollection

  • Remove

    void Remove(uint componentId)
    

    Description: Removes a component.
    Parameters:

    • uint componentId

    Returns: void

    Improbable.Worker.CInterop.EntityQueryResponseOp struct

    Summary A response indicating the result of an entity query request.

    Fields and Properties

    • string Message - A description of the status. Will contain the reason for failure if unsuccessful.

    • System.Int64 RequestId - The outgoing request ID for which there was a response.
      Matches a previous call to SendEntityQueryRequest.

    • System.Collections.Generic.Dictionary<System.Int64, Entity> Result - The result of the query. Not used for CountResultType queries.
      Note that a best-effort attempt is made to get results when the status code is ApplicationError. In this case, the result can still be non-empty, but should be considered incomplete (i.e. there might be entities matching the query that were not returned).

    • int ResultCount - The number of entities that matched the query.
      Note that a best-effort attempt is made to count the entities when the status code is ApplicationError. In this case, the count can still be non-zero, but should be considered a lower bound (i.e. there might be entities matching the query that were not counted).

    • StatusCodeStatusCode - The status code of the response.

    Improbable.Worker.CInterop.ErasureCodecParameters class

    Summary Parameters to configure erasure coding, a forward error correction technique which increases bandwidth usage but may improve latency on unreliable networks.

    Fields and Properties

    • byte OriginalPacketCount =ErasureCodecOriginalPacketCount - Number of consecutive packets to send before sending redundant recovery packets.

    • byte RecoveryPacketCount =ErasureCodecRecoveryPacketCount - Number of redundant recovery packets to send for each group of consecutive original packets. These packets are used to recover up to the same number of lost original packets.

    • byte WindowSize =ErasureCodecWindowSize - Number of batches that can be stored in memory, where a batch contains packets belonging to the same group of consecutive original packets and the corresponding recovery packets. Each batch contains up to OriginalPacketCount plus RecoveryPacketCount packets.

    Improbable.Worker.CInterop.FlagUpdateOp struct

    Summary Data for an operation that indicates a worker flag has been created, deleted or its value has changed.

    Fields and Properties

    • string Name

    • string Value

    Improbable.Worker.CInterop.FlowControlParameters class

    Summary Parameters to configure flow control. Used by ModularKcpNetworkParameters and ModularTcpNetworkParameters.

    Fields and Properties

    • uint DownstreamWindowSizeBytes - The maximum number of bytes of serialized messages sent by SpatialOS that can be held in memory on the worker at any one time.

    • uint UpstreamWindowSizeBytes - The maximum number of bytes of serialized messages sent by the worker that can be held in memory on the bridge at any one time.

    Improbable.Worker.CInterop.Future<T> class

    Implements System.IDisposable
    Summary A class representing the standard future concept. It can be used for both synchronous and asynchronous interaction.

    Type parameters

    • T

    Methods

    • Dispose
    void Dispose()
    

    Returns: void

  • Get

    T Get()
    

    Description: Waits until the result becomes available, and returns it. If the result was already obtained by a previous call to Get() or Get(timeoutMillis), this function returns it immediately.
    Returns: T - The result.

    • TryGet
    bool TryGet(out T result, uint timeoutMillis = 0)
    

    Parameters:

    • out T result
    • uint timeoutMillis = 0

    Returns: bool - True if the result is available, false otherwise.

Improbable.Worker.CInterop.HeartbeatParameters class

Summary Parameters to configure internal heartbeating which can detect unresponsive peers. If an unresponsive peer is detected, a DisconnectOp will be enqueued in the OpList.

Fields and Properties

  • ulong IntervalMillis =HeartbeatIntervalMillis - Minimum interval, in milliseconds, between which heartbeat messages are sent to the peer. A new heartbeat won’t be sent before a response for the original heartbeat is received.

  • ulong TimeoutMillis =HeartbeatTimeoutMillis - Time, in milliseconds, after which the peer will be deemed unresponsive.

Improbable.Worker.CInterop.HistogramMetric class

Summary A histogram metric tracks observations of a given value by bucket. This corresponds to a Prometheus histogram metric.
Remarks This object should not be used concurrently by multiple threads.

Fields and Properties

  • System.Collections.Generic.List<Bucket> Buckets { get; } - Returns the buckets for inspection.

  • double Sum { get; } - Returns the sum of all observations since the last call to ClearObservations.

Constructors

HistogramMetric()

Description: Creates a histogram with a single bucket.

HistogramMetric(System.Collections.Generic.List<double> upperBounds)

Description: Creates a histogram with the given bucket boundaries. Each bucket boundary is an upper bound; the bucket tracks all observations with a value less than or equal to the bound. A final bucket with a boundary of +INF is added automatically.
Parameters:

  • System.Collections.Generic.List<double> upperBounds

HistogramMetric(System.Collections.Generic.List<Bucket> buckets, double sum)

Description: Creates a histogram with the given the given buckets and sum.
Parameters:

  • System.Collections.Generic.List<Bucket> buckets
  • double sum

Methods

  • ClearObservations

    void ClearObservations()
    

    Description: Clears all recorded oservations.
    Remarks: Automatically called by SendMetrics.
    Returns: void

    • RecordObservation
    void RecordObservation(double value)
    

    Description: Records a sample and adds it to the corresponding buckets.
    Parameters:

    • double value

    Returns: void

Nested classes

  • Improbable.Worker.CInterop.HistogramMetric.Bucket - A histogram bucket.

Improbable.Worker.CInterop.HistogramMetric.Bucket struct

Summary A histogram bucket.

Fields and Properties

  • uint Samples - The number of observations that were less than or equal to the upper bound.

  • double UpperBound - The upper bound.

Improbable.Worker.CInterop.InterestOverride struct

Summary Overrides the default interest settings for a particular entity and component.

Fields and Properties

  • bool IsInterested - Controls whether checkout is explicitly enabled or disabled.

Improbable.Worker.CInterop.JsonParameters class

Fields and Properties

  • bool EnablePrettyPrinting = false

Improbable.Worker.CInterop.KcpNetworkParameters class

Summary Parameters for configuring a KCP connection. Used by NetworkParameters.

Fields and Properties

  • bool EarlyRetransmission =KcpEarlyRetransmission - Whether to enable early retransmission, which causes KCP to retransmit packets early if ackowledgements are received for later packets first, rather than waiting until the retransmission timeout has expired.

  • bool EnableErasureCodec =KcpEnableErasureCodec - Whether to enable the erasure codec.

  • ErasureCodecParametersErasureCodec - Erasure codec parameters.

  • bool FastRetransmission =KcpFastRetransmission - Whether to enable fast retransmission, which causes retransmission delays to increase more slowly when retransmitting timed-out packets multiple times.

  • HeartbeatParametersHeartbeat - Heartbeat parameters.

  • uint MinRtoMillis =KcpMinRtoMillis - Hard limit on the minimum retransmission timeout. A packet will be resent if an acknowledgment has not been received from the peer within a time period known as the retransmission timeout. The retransmission timeout is calculated based on estimated round trip times to the remote peer, but it is never set to a value lower than the minimum retransmission timeout. If you set this parameter to a value that is much higher than the average round trip time (or ping) to a peer, it is likely to result in packets not being resent as early as they could be, increasing latency for retransmitted packets. However, if you set this parameter to a value that is lower than the average round trip time, packets are retransmitted even if they are not lost, which causes unnecessary bandwidth overhead until round trip times are calculated. For more information on retransmission timeouts and their calculation, see RFC 6298. Note, however, that the RFC pertains to TCP, and therefore it focuses on avoiding unnecessary retransmissions rather than optimizing for latency. Set to zero to use default, which is lower when FastRetransmission is enabled.

  • uint MultiplexLevel =KcpMultiplexLevel - Number of multiplexed KCP streams. Updates for entities are sharded across streams: the higher the multiplex level, the fewer entities might be impacted by a delayed update. Messages across streams cannot be packed into the same UDP packet. This might result in higher bandwidth usage. Increasing the number of multiplexed streams might also increase CPU usage.

  • bool NonConcessionalFlowControl =KcpNonConcessionalFlowControl - Whether to enable non-concessional flow control, which disables the usage of congestion windows (which are used to reduce packet loss across congested networks). Enabling non-concessional flow control can help optimize for low-latency delivery of small messages.

  • uint RecvWindowSize =KcpRecvWindowSize - KCP flow control window for receiving, in number of KCP packets. This window is applied to each independent stream. The upper bound on the memory used by receive buffers is proportional to the multiplex level multiplied by the receive window size.

  • NetworkSecurityTypeSecurityType

  • uint SendWindowSize =KcpSendWindowSize - KCP flow control window size for sending, in number of KCP packets. This window is applied to sending across all streams i.e. sending a message will block if it would cause the total number of un-acked outgoing packets to exceed the send window size.

  • uint UpdateIntervalMillis =KcpUpdateIntervalMillis - Interval, in milliseconds, between which the KCP transport layer sends and receives packets waiting in its send and receive buffers respectively.

Improbable.Worker.CInterop.KcpTransportParameters class

Summary Parameters for configuring the KCP transport layer within the modular KCP network stack. Used by ModularKcpNetworkParameters.
Remarks Not to be confused with KcpNetworkParameters, which are parameters for the whole ModularKcp connection type.

Fields and Properties

  • bool DisableCongestionControl =KcpNonConcessionalFlowControl - Whether to disable congestion control, which disables the use of congestion windows (these reduce packet loss across congested networks). Disabling congestion control can optimize for low-latency delivery of small messages.

  • bool EarlyRetransmission =KcpEarlyRetransmission - Whether to enable early retransmission, which causes KCP to retransmit packets early if ackowledgements are received for later packets first, rather than waiting until the retransmission timeout has expired.

  • bool FastRetransmission =KcpFastRetransmission - Whether to enable fast retransmission, which causes retransmission delays to increase more slowly when retransmitting timed-out packets multiple times.

  • uint FlushIntervalMillis =KcpUpdateIntervalMillis - The maximum interval, in milliseconds, between which the KCP transport layer flushes packets waiting in its cross-stream send buffer to the network. The transport layer might send earlier if there are enough packets to fill the MTU, or if it receives a call to flush the network.

  • uint MinRtoMillis =KcpMinRtoMillis - Hard limit on the minimum retransmission timeout. A packet is resent if an acknowledgment has not been received from the peer within a time period known as the retransmission timeout. The retransmission timeout is calculated based on estimated round trip times to the remote peer, but it is never set to a value lower than the minimum retransmission timeout. If you set this parameter to a value that is much higher than the average round trip time (or ping) to a peer, it is likely to result in packets not being resent as early as they could be, increasing latency for retransmitted packets. However, if you set this parameter to a value that is lower than the average round trip time, packets are retransmitted even if they are not lost, which causes unnecessary bandwidth overhead until round trip times are calculated. For more information on retransmission timeouts and their calculation, see RFC 6298. Note, however, that the RFC pertains to TCP, and therefore it focuses on avoiding unnecessary retransmissions rather than optimizing for latency. Set to zero to use default, which is lower when FastRetransmission is enabled.

Improbable.Worker.CInterop.Locator class

Implements System.IDisposable
Summary A client which can be used to connect to a SpatialOS deployment via a locator service. This is the standard flow used to connect a local worker to a cloud deployment.
Remarks This object should not be used concurrently by multiple threads.

Constructors

Locator(string hostname, LocatorParameters locatorParams)

Description: Creates a client for a locator service in the cloud.
Parameters:

  • string hostname - Typically it is “locator.improbable.io”.

  • LocatorParameterslocatorParams - The parameters for the locator service.

Locator(string hostname, ushort port, LocatorParameters locatorParams)

Description: Creates a client for a locator service at the given port.
Parameters:

  • string hostname - Typically it is “locator.improbable.io”.

  • ushort port - The port number used to connect to the locator service. This should be set to zero if connecting to a locator service running on the cloud.

  • LocatorParameterslocatorParams - The parameters for the locator service.

Methods

  • ConnectAsync

    Future<Connection> ConnectAsync(ConnectionParameters connectionParams)
    

    Description: Connects to a specific deployment. The resulting future can be used to make this connection either synchronously or asyncronously.
    Parameters:

    Returns: Future<Connection> - A future object for the connection

    • Dispose
    void Dispose()
    

    Returns: void

  • GetDeploymentListAsync

    Future<DeploymentList?> GetDeploymentListAsync()
    

    Description: Queries the current list of deployments for the project given in the LocatorParameters. The resulting future can be used to make this connection either synchronously or asyncronously.
    Returns: Future<DeploymentList?> - A future object for the list of deployments.

    Improbable.Worker.CInterop.LocatorCredentialsType enum

    Fields

    Improbable.Worker.CInterop.LocatorParameters class

    Summary Parameters for authenticating and logging in to a SpatialOS deployment via the locator.

    Fields and Properties

    • LocatorCredentialsTypeCredentialsType - Type of credentials to use when authenticating via the Locator.

    • bool EnableLogging = false - (Deprecated) Whether to enable logging for the locator flow.

    • ProtocolLoggingParametersLogging - (Deprecated) Parameters for configuring logging. Distinct from protocol logs: only relevant to the locator connection.

    • LoginTokenCredentialsLoginToken - Parameters used if the CredentialsType is LoginToken.

    • System.Collections.Generic.List<LogsinkParameters> Logsinks - List of logsinks that receive filtered log messages for the Locator flow.

    • PlayerIdentityCredentialsPlayerIdentity - The player identity token/login token pair used for authentication.

    • string ProjectName - The name of the SpatialOS project.

    • SteamCredentialsSteam - Parameters used if the CredentialsType is Steam.

    • bool UseInsecureConnection - Whether to use an insecure (non-TLS) connection for local development.

    Improbable.Worker.CInterop.LogCategory enum

    Fields

    Improbable.Worker.CInterop.LogData class

    Summary Represents a log message to be consumed by a user-defined callback.

    Fields and Properties

    • LogCategoryCategories - The log categories that this message was generated with.

    • string Content - The message content.

    • LogLevelLevel - The log level of this message.

    • string Timestamp - Date & time when this message was generated.

    Improbable.Worker.CInterop.LogFilterParameters class

    Summary Parameters for configuring a custom filter predicate.

    Fields and Properties

    • LogCategoryCategories =DefaultLogCategories - Combination of LogCategory flags defining the messages that should be received. If a message has at least one of these flags, it is logged to the sink.

    • System.Func<LogCategory, LogLevel, bool> CustomFilter - If set, all log messages are sent through this filter function and ignore the categories and level members. Note that this callback will be called concurrently from different threads. You need to synchronize access to data that is shared with the thread this callback was set on.

    • LogLevelLevel =DefaultLogLevel - All messages of log level >= level are received.

    Improbable.Worker.CInterop.LogLevel enum

    Fields

    Improbable.Worker.CInterop.LogMessageOp struct

    Summary Data for an operation that provides a log message from the SDK.
    Remarks This operation has been deprecated and will be removed from a future version of SpatialOS.

    Fields and Properties

    Improbable.Worker.CInterop.LoginTokenCredentials class

    Summary Parameters for authenticating using a SpatialOS login token.

    Fields and Properties

    • string Token - The token would typically be provided on the command-line by the SpatialOS launcher.

    Improbable.Worker.CInterop.LogsinkParameters class

    Summary Parameters for configuring a logsink in the SDK.

    Fields and Properties

    • System.Action<LogData> Callback - Parameters for custom log callback. Only used if logsink_type == LogsinkType.Callback. Note that this callback will be called from different threads. You need to synchronize access to data that is shared with the thread this callback was set on. However, the logger guarantees that only a single log callback is run at a time per connection which can sometimes eliminate the need for synchronization.

    • LogFilterParametersFilterParameters - Parameters for controlling filtering of log messages.

    • RotatingLogFileParametersRotatingFileParameters - Parameters for a rotating log file sink. Only used if logsink_type == LogsinkType.RotatingFile.

    • LogsinkTypeType =DefaultLogsinkType - The type of logsink to use. Depending on this value, a subset of other members is used.

    Improbable.Worker.CInterop.LogsinkType enum

    Fields

    Improbable.Worker.CInterop.Metrics class

    Summary A set of metrics sent up from a worker to SpatialOS.
    Remarks Keys for the contained metrics should match the following regex: [a-zA-Z][a-zA-Z0-9]*

    Fields and Properties

    • System.Collections.Generic.Dictionary<string, double> GaugeMetrics { get; } - Gauge metrics for the worker.

    • System.Collections.Generic.Dictionary<string, HistogramMetric> HistogramMetrics { get; } - Histogram metrics for the worker.

    • double? Load { set; } - The load value of this worker. A value of 0 indicates that the worker is completely unloaded; a value greater than 1 indicates that the worker is overloaded. The load value directs SpatialOS’s load-balancing strategy for managed workers (spinning them up, spinning them down, and assigning work between them).

    Methods

    • Merge
    void Merge(Metrics metrics)
    

    Description: Copies all metrics from another Metrics object into this one, overwriting existing values.
    Parameters:

    Returns: void

Improbable.Worker.CInterop.MetricsOp struct

Summary Data for an operation that provides a report on built-in metrics from the SDK.

Fields and Properties

Improbable.Worker.CInterop.ModularKcpNetworkParameters class

Summary Parameters for configuring a modular KCP connection. Used by NetworkParameters.

Fields and Properties

  • CompressionParametersDownstreamCompression - Compression parameters for messages sent from the bridge to the worker.

  • ErasureCodecParametersDownstreamErasureCodec - Erasure codec parameters for messages sent from the bridge to the worker.

  • HeartbeatParametersDownstreamHeartbeat - Heartbeat parameters for heartbeats sent from the bridge to the worker.

  • KcpTransportParametersDownstreamKcp - KCP parameters for messages sent from the bridge to the worker.

  • FlowControlParametersFlowControl - Flow control parameters.

  • byte MultiplexLevel =KcpMultiplexLevel - Number of multiplexed KCP streams. Updates for entities are sharded across streams: the higher the multiplex level, the fewer entities might be impacted by a delayed update. Increasing the number of multiplexed streams might increase CPU usage.

  • NetworkSecurityTypeSecurityType

  • CompressionParametersUpstreamCompression - Compression parameters for messages sent from the worker to the bridge.

  • ErasureCodecParametersUpstreamErasureCodec - Erasure codec parameters for messages sent from the worker to the bridge.

  • HeartbeatParametersUpstreamHeartbeat - Heartbeat parameters for heartbeats sent from the worker to the bridge.

  • KcpTransportParametersUpstreamKcp - KCP parameters for messages sent from the worker to the bridge.

Improbable.Worker.CInterop.ModularTcpNetworkParameters class

Summary Parameters for configuring a modular TCP connection. Used by NetworkParameters.

Fields and Properties

  • CompressionParametersDownstreamCompression - Compression parameters for messages sent from the bridge to the worker.

  • HeartbeatParametersDownstreamHeartbeat - Heartbeat parameters for heartbeats sent from the bridge to the worker.

  • TcpTransportParametersDownstreamTcp - TCP parameters for messages sent from the bridge to the worker.

  • FlowControlParametersFlowControl - Flow control parameters.

  • byte MultiplexLevel =ModularTcpMultiplexLevel - The number of multiplexed TCP connections to use. Updates for entities are sharded across connections: the higher the multiplex level, the fewer entities might be impacted by a delayed update. Messages across connections cannot be packed into the same TCP packet, which may result in higher bandwidth usage. Increasing the number of multiplexed streams may also increase CPU usage.

  • NetworkSecurityTypeSecurityType

  • CompressionParametersUpstreamCompression - Compression parameters for messages sent from the worker to the bridge.

  • HeartbeatParametersUpstreamHeartbeat - Heartbeat parameters for heartbeats sent from the worker to the bridge.

  • TcpTransportParametersUpstreamTcp - TCP parameters for messages sent from the worker to the bridge.

Improbable.Worker.CInterop.NetworkConnectionType enum

Fields

Improbable.Worker.CInterop.NetworkParameters class

Summary Parameters for configuring the network connection.

Fields and Properties

  • ulong ConnectionTimeoutMillis = IMPROBABLE.WORKER.DEFAULTS.CONNECTION_TIMEOUT_MILLIS - This parameter sets an upper bound on the time the futures returned by ConnectAsync or ConnectAsync functions will take to complete. If the attempt is unsuccessful by that point, the connection attempt will be stopped.

  • NetworkConnectionTypeConnectionType =Tcp - Type of network connection to use when connecting to SpatialOS.

  • uint DefaultCommandTimeoutMillis =DefaultCommandTimeoutMillis - Default timeout for commands without a specified timeout argument, in millis.

  • KcpNetworkParametersKcp - Connection parameters specific to KCP connections.

  • ModularKcpNetworkParametersModularKcp - Connection parameters specific to modular KCP connections.

  • ModularTcpNetworkParametersModularTcp - Connection parameters specific to modular TCP connections.

  • RakNetNetworkParametersRakNet - Connection parameters specific to RakNet connections.

  • TcpNetworkParametersTcp - Connection parameters specific to TCP connections.

  • bool UseExternalIp =UseExternalIp - Set this flag to connect to SpatialOS using the externally-visible IP address. This flag must be set when connecting externally (i.e. from outside the cloud) to a cloud deployment.

Improbable.Worker.CInterop.NetworkSecurityType enum

Fields

Improbable.Worker.CInterop.OpList class

Implements System.IDisposable
Summary An opaque list of operations retrieved from GetOpList.

Methods

  • Dispose

    void Dispose()
    

    Returns: void

    • GetAddComponentOp
    AddComponentOp GetAddComponentOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of AddComponentOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: AddComponentOp

  • GetAddEntityOp

    AddEntityOp GetAddEntityOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of AddEntityOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: AddEntityOp

    • GetAuthorityChangeOp
    AuthorityChangeOp GetAuthorityChangeOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of AuthorityChangeOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: AuthorityChangeOp

  • GetCommandRequestOp

    CommandRequestOp GetCommandRequestOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of CommandRequestOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: CommandRequestOp

    • GetCommandResponseOp
    CommandResponseOp GetCommandResponseOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of CommandResponseOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: CommandResponseOp

  • GetComponentUpdateOp

    ComponentUpdateOp GetComponentUpdateOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of ComponentUpdateOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: ComponentUpdateOp

    • GetCreateEntityResponseOp
    CreateEntityResponseOp GetCreateEntityResponseOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of CreateEntityResponseOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: CreateEntityResponseOp

  • GetCriticalSectionOp

    CriticalSectionOp GetCriticalSectionOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of CriticalSectionOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: CriticalSectionOp

    • GetDeleteEntityResponseOp
    DeleteEntityResponseOp GetDeleteEntityResponseOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of DeleteEntityResponseOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: DeleteEntityResponseOp

  • GetDisconnectOp

    DisconnectOp GetDisconnectOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of DisconnectOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: DisconnectOp

    • GetEntityQueryResponseOp
    EntityQueryResponseOp GetEntityQueryResponseOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of EntityQueryResponseOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: EntityQueryResponseOp

  • GetFlagUpdateOp

    FlagUpdateOp GetFlagUpdateOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of FlagUpdateOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: FlagUpdateOp

    • GetLogMessageOp
    LogMessageOp GetLogMessageOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of LogMessageOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: LogMessageOp

  • GetMetricsOp

    MetricsOp GetMetricsOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of MetricsOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: MetricsOp

    • GetOpCount
    int GetOpCount()
    

    Description: Returns the number of operations present in this list.
    Returns: int

  • GetOpType

    OpType GetOpType(int opIndex)
    

    Description: Returns the type of the operation at the specified index.
    Parameters:

    • int opIndex

    Returns: OpType

    • GetRemoveComponentOp
    RemoveComponentOp GetRemoveComponentOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of RemoveComponentOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: RemoveComponentOp

  • GetRemoveEntityOp

    RemoveEntityOp GetRemoveEntityOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of RemoveEntityOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: RemoveEntityOp

    • GetReserveEntityIdsResponseOp
    ReserveEntityIdsResponseOp GetReserveEntityIdsResponseOp(int opIndex)
    

    Description: Returns the operation at the specified index as an instance of ReserveEntityIdsResponseOp. You have to ensure that the operation at the specified index has the correct type.
    Parameters:

    • int opIndex

    Returns: ReserveEntityIdsResponseOp

Improbable.Worker.CInterop.OpType enum

Fields

Improbable.Worker.CInterop.PlayerIdentityCredentials class

Summary Parameters for authenticating using a player identity token and login token.

Fields and Properties

  • string LoginToken - Authenticates a user to a single deployment. Obtained from a game authentication server using a player identity token.

  • string PlayerIdentityToken - Uniquely identifies a user across deployments, and is provided by a game authentication server.

Improbable.Worker.CInterop.ProtocolLoggingParameters class

Summary Parameters for configuring protocol logging. If enabled, logs all protocol messages sent and received.
Remarks We have deprecated this type and will be remove it in a future version of SpatialOS.

Fields and Properties

  • string LogPrefix =LogPrefix - Log file names are prefixed with this prefix, are numbered, and have the extension .log.

  • uint MaxLogFileSizeBytes =MaxLogFileSizeBytes - Once the size of a log file reaches this size, a new log file is created.

  • uint MaxLogFiles =MaxLogFiles - Maximum number of log files to keep. Note that logs from any previous protocol logging sessions will be overwritten.

Improbable.Worker.CInterop.QueueStatus struct

Summary A queue status update when connecting to a deployment via ConnectAsync.

Fields and Properties

  • string Error - Will be non-null if an error occurred.

  • uint PositionInQueue - Position in the queue. Decreases as we advance to the front of the queue.

Improbable.Worker.CInterop.RakNetNetworkParameters class

Summary Parameters for configuring a RakNet connection. Used by NetworkParameters.

Fields and Properties

Improbable.Worker.CInterop.RemoveComponentOp struct

Summary Data for an operation that indicates a component has been removed from an existing entity in the worker’s view of the simulation

Fields and Properties

  • uint ComponentId

  • System.Int64 EntityId

Improbable.Worker.CInterop.RemoveEntityOp struct

Summary Data for an operation that indicates an entity has been removed from the worker’s view of the simulation.

Fields and Properties

  • System.Int64 EntityId - The ID of the entity that was removed from the worker’s view of the simulation.

Improbable.Worker.CInterop.ReserveEntityIdsResponseOp struct

Summary A response indicating the result of the multiple entity ID reservation request.

Fields and Properties

  • System.Int64? FirstEntityId - If successful, an ID which is the first in a contiguous range of newly allocated entity IDs which are guaranteed to be unused in the current deployment.

  • string Message - A description of the status. Will contain the reason for failure if unsuccessful.

  • int NumberOfEntityIds - If successful, the number of IDs reserved in the contiguous range, otherwise 0.

  • System.Int64 RequestId - The outgoing request ID for which there was a response.
    Matches the request ID returned by a previous call to SendReserveEntityIdsRequest.

  • StatusCodeStatusCode - The status code of the response.

Improbable.Worker.CInterop.RotatingLogFileParameters class

Summary Parameters for configuring the rotating log files used for a logsink.

Fields and Properties

  • string LogPrefix =LogPrefix - Log file names are prefixed with this prefix, are numbered, and have the extension .log.

  • uint MaxLogFileSizeBytes =MaxLogFileSizeBytes - When a log file reaches this size, a new log file is created.

  • uint MaxLogFiles =MaxLogFiles - Maximum number of log files to keep. Note that logs from any previous protocol logging sessions are overwritten.

Improbable.Worker.CInterop.SchemaBundle class

Implements System.IDisposable
Summary Loads the schema bundle from a specified buffer and length.

Constructors

SchemaBundle(System.Byte* buffer, System.UInt32 size)

Parameters:

  • System.Byte* buffer
  • System.UInt32 size

SchemaBundle(byte[] buffer)

Parameters:

  • byte[] buffer

Methods

  • Dispose

    void Dispose()
    

    Returns: void

    Improbable.Worker.CInterop.SchemaCommandRequest struct

    Summary A wrapper over a raw Schema_CommandRequest pointer. Ownership of the memory is transferred when this object is passed into any other API. If this object is never passed into an API, then Destroy() must be called explicitly.

    Methods

    • Copy
    SchemaCommandRequest Copy()
    

    Returns: SchemaCommandRequest

  • Create

    static SchemaCommandRequest Create()
    

    Returns: SchemaCommandRequest

    • Destroy
    void Destroy()
    

    Returns: void

  • GetObject

    SchemaObject GetObject()
    

    Returns: SchemaObject

    Improbable.Worker.CInterop.SchemaCommandResponse struct

    Summary A wrapper over a raw Schema_CommandResponse pointer. Ownership of the memory is transferred when this object is passed into any other API. If this object is never passed into an API, then Destroy() must be called explicitly.

    Methods

    • Copy
    SchemaCommandResponse Copy()
    

    Returns: SchemaCommandResponse

  • Create

    static SchemaCommandResponse Create()
    

    Returns: SchemaCommandResponse

    • Destroy
    void Destroy()
    

    Returns: void

  • GetObject

    SchemaObject GetObject()
    

    Returns: SchemaObject

    Improbable.Worker.CInterop.SchemaComponentData struct

    Summary A wrapper over a raw Schema_ComponentData pointer. Ownership of the memory is transferred when this object is passed into any other API. If this object is never passed into an API, then Destroy() must be called explicitly.

    Methods

    • ApplyComponentUpdate
    void ApplyComponentUpdate(SchemaComponentUpdate update)
    

    Parameters:

    • SchemaComponentUpdateupdate - Merges a component update update into this at-rest component data object. This is semantically equivalent to a component update being “applied” to the at-rest component data. This function will mutate this object by appending the bytes representation of the update to the end of the component data. This is efficient because if the component update is small, it would not need to reshuffle any fields under the hood, but will have unbounded memory growth (proportional to the serialized component update after each function call). To avoid mutating the data and having unbounded memory growth, first create a copy of this component data by calling Copy(). Note that calling Copy() on a component data will only require storage for the serialized size of the component data in the returned object, hence why memory growth is no longer unbounded when this is used.

    Returns: void

  • Destroy

    void Destroy()
    

    Returns: void

    • GetFields
    SchemaObject GetFields()
    

    Returns: SchemaObject

Improbable.Worker.CInterop.SchemaComponentUpdate struct

Summary A wrapper over a raw Schema_ComponentData pointer. Ownership of the memory is transferred when this object is passed into any other API. If this object is never passed into an API, then Destroy() must be called explicitly.

Methods

  • AddClearedField

    void AddClearedField(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: void

    • ClearClearedFields
    void ClearClearedFields()
    

    Returns: void

  • Destroy

    void Destroy()
    

    Returns: void

    • GetClearedFieldCount
    uint GetClearedFieldCount()
    

    Returns: uint

  • GetClearedFields

    System.UInt32[] GetClearedFields()
    

    Returns: System.UInt32[]

    • GetEvents
    SchemaObject GetEvents()
    

    Returns: SchemaObject

  • GetFields

    SchemaObject GetFields()
    

    Returns: SchemaObject

    • IndexClearedField
    System.UInt32 IndexClearedField(uint index)
    

    Parameters:

    • uint index

    Returns: System.UInt32

  • IsFieldCleared

    bool IsFieldCleared(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: bool

    • MergeUpdate
    void MergeUpdate(SchemaComponentUpdate update)
    

    Description: Merges a component update update into this update. This is semantically equivalent to combining two component updates into a single component update such that, when applied to some at-rest component data, it will be semantically equivalent to applying this update, followed by update. The passed in update will become empty once this function is executed, and should be destroyed by calling update.Destroy().
    Parameters:

    Returns: void

Improbable.Worker.CInterop.SchemaGenericData struct

Summary A wrapper over a raw Schema_GenericData pointer. Ownership of the memory is transferred when this object is passed into any other API. If this object is never passed into an API, then Destroy() must be called explicitly.

Methods

  • Destroy

    void Destroy()
    

    Returns: void

    • GetObject
    SchemaObject GetObject()
    

    Returns: SchemaObject

Improbable.Worker.CInterop.SchemaObject struct

Summary A wrapper over a raw Schema_Object pointer.

Methods

  • AddBool

    void AddBool(System.UInt32 fieldId, bool value)
    

    Parameters:

    • System.UInt32 fieldId
    • bool value

    Returns: void

    • AddBoolList
    void AddBoolList(System.UInt32 fieldId, bool* buffer, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • bool* buffer
    • int length

    Returns: void

  • AddBoolList

    void AddBoolList(System.UInt32 fieldId, bool[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • bool[] value

    Returns: void

    • AddBytes
    void AddBytes(System.UInt32 fieldId, System.Byte* buffer, System.UInt32 bufferLength)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Byte* buffer
    • System.UInt32 bufferLength

    Returns: void

  • AddBytes

    void AddBytes(System.UInt32 fieldId, System.Byte[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Byte[] value

    Returns: void

    • AddDouble
    void AddDouble(System.UInt32 fieldId, double value)
    

    Parameters:

    • System.UInt32 fieldId
    • double value

    Returns: void

  • AddDoubleList

    void AddDoubleList(System.UInt32 fieldId, double[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • double[] value

    Returns: void

    • AddDoubleList
    void AddDoubleList(System.UInt32 fieldId, double* buffer, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • double* buffer
    • int length

    Returns: void

  • AddEntityId

    void AddEntityId(System.UInt32 fieldId, System.Int64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64 value

    Returns: void

    • AddEntityIdList
    void AddEntityIdList(System.UInt32 fieldId, System.Int64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64[] value

    Returns: void

  • AddEntityIdList

    void AddEntityIdList(System.UInt32 fieldId, System.Int64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* value
    • int length

    Returns: void

    • AddEnum
    void AddEnum(System.UInt32 fieldId, System.UInt32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 value

    Returns: void

  • AddEnumList

    void AddEnumList(System.UInt32 fieldId, System.UInt32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* value
    • int length

    Returns: void

    • AddEnumList
    void AddEnumList(System.UInt32 fieldId, System.UInt32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32[] value

    Returns: void

  • AddFixed32

    void AddFixed32(System.UInt32 fieldId, System.UInt32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 value

    Returns: void

    • AddFixed32List
    void AddFixed32List(System.UInt32 fieldId, System.UInt32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* value
    • int length

    Returns: void

  • AddFixed32List

    void AddFixed32List(System.UInt32 fieldId, System.UInt32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32[] value

    Returns: void

    • AddFixed64
    void AddFixed64(System.UInt32 fieldId, System.UInt64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64 value

    Returns: void

  • AddFixed64List

    void AddFixed64List(System.UInt32 fieldId, System.UInt64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64* value
    • int length

    Returns: void

    • AddFixed64List
    void AddFixed64List(System.UInt32 fieldId, System.UInt64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64[] value

    Returns: void

  • AddFloat

    void AddFloat(System.UInt32 fieldId, float value)
    

    Parameters:

    • System.UInt32 fieldId
    • float value

    Returns: void

    • AddFloatList
    void AddFloatList(System.UInt32 fieldId, float* buffer, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • float* buffer
    • int length

    Returns: void

  • AddFloatList

    void AddFloatList(System.UInt32 fieldId, float[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • float[] value

    Returns: void

    • AddInt32
    void AddInt32(System.UInt32 fieldId, System.Int32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32 value

    Returns: void

  • AddInt32List

    void AddInt32List(System.UInt32 fieldId, System.Int32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* value
    • int length

    Returns: void

    • AddInt32List
    void AddInt32List(System.UInt32 fieldId, System.Int32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32[] value

    Returns: void

  • AddInt64

    void AddInt64(System.UInt32 fieldId, System.Int64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64 value

    Returns: void

    • AddInt64List
    void AddInt64List(System.UInt32 fieldId, System.Int64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* value
    • int length

    Returns: void

  • AddInt64List

    void AddInt64List(System.UInt32 fieldId, System.Int64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64[] value

    Returns: void

    • AddObject
    SchemaObject AddObject(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: SchemaObject

  • AddSfixed32

    void AddSfixed32(System.UInt32 fieldId, System.Int32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32 value

    Returns: void

    • AddSfixed32List
    void AddSfixed32List(System.UInt32 fieldId, System.Int32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32[] value

    Returns: void

  • AddSfixed32List

    void AddSfixed32List(System.UInt32 fieldId, System.Int32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* value
    • int length

    Returns: void

    • AddSfixed64
    void AddSfixed64(System.UInt32 fieldId, System.Int64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64 value

    Returns: void

  • AddSfixed64List

    void AddSfixed64List(System.UInt32 fieldId, System.Int64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* value
    • int length

    Returns: void

    • AddSfixed64List
    void AddSfixed64List(System.UInt32 fieldId, System.Int64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64[] value

    Returns: void

  • AddSint32

    void AddSint32(System.UInt32 fieldId, System.Int32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32 value

    Returns: void

    • AddSint32List
    void AddSint32List(System.UInt32 fieldId, System.Int32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32[] value

    Returns: void

  • AddSint32List

    void AddSint32List(System.UInt32 fieldId, System.Int32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* value
    • int length

    Returns: void

    • AddSint64
    void AddSint64(System.UInt32 fieldId, System.Int64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64 value

    Returns: void

  • AddSint64List

    void AddSint64List(System.UInt32 fieldId, System.Int64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* value
    • int length

    Returns: void

    • AddSint64List
    void AddSint64List(System.UInt32 fieldId, System.Int64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64[] value

    Returns: void

  • AddString

    void AddString(System.UInt32 fieldId, string value)
    

    Parameters:

    • System.UInt32 fieldId
    • string value

    Returns: void

    • AddUint32
    void AddUint32(System.UInt32 fieldId, System.UInt32 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 value

    Returns: void

  • AddUint32List

    void AddUint32List(System.UInt32 fieldId, System.UInt32* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* value
    • int length

    Returns: void

    • AddUint32List
    void AddUint32List(System.UInt32 fieldId, System.UInt32[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32[] value

    Returns: void

  • AddUint64

    void AddUint64(System.UInt32 fieldId, System.UInt64 value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64 value

    Returns: void

    • AddUint64List
    void AddUint64List(System.UInt32 fieldId, System.UInt64* value, int length)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64* value
    • int length

    Returns: void

  • AddUint64List

    void AddUint64List(System.UInt32 fieldId, System.UInt64[] value)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64[] value

    Returns: void

    • AllocateBuffer
    System.Byte* AllocateBuffer(System.UInt32 bufferLength)
    

    Parameters:

    • System.UInt32 bufferLength

    Returns: System.Byte*

  • AllocateObject

    SchemaObject AllocateObject()
    

    Returns: SchemaObject

    • Clear
    void Clear()
    

    Returns: void

  • ClearField

    void ClearField(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: void

    • GetBool
    bool GetBool(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: bool

  • GetBoolCount

    System.UInt32 GetBoolCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetBoolList
    bool[] GetBoolList(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: bool[]

  • GetBoolList

    void GetBoolList(System.UInt32 fieldId, bool* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • bool* buffer

    Returns: void

    • GetBytes
    System.Byte[] GetBytes(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Byte[]

  • GetBytesBuffer

    System.Byte* GetBytesBuffer(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Byte*

    • GetBytesCount
    System.UInt32 GetBytesCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetBytesLength

    int GetBytesLength(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: int

    • GetDouble
    double GetDouble(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: double

  • GetDoubleCount

    System.UInt32 GetDoubleCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetDoubleList
    double[] GetDoubleList(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: double[]

  • GetDoubleList

    void GetDoubleList(System.UInt32 fieldId, double* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • double* buffer

    Returns: void

    • GetEntityId
    System.Int64 GetEntityId(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64

  • GetEntityIdCount

    System.UInt32 GetEntityIdCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetEntityIdList
    void GetEntityIdList(System.UInt32 fieldId, System.Int64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* buffer

    Returns: void

  • GetEntityIdList

    System.Int64[] GetEntityIdList(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64[]

    • GetEnum
    System.UInt32 GetEnum(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetEnumCount

    System.UInt32 GetEnumCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetEnumList
    void GetEnumList(System.UInt32 fieldId, System.UInt32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* buffer

    Returns: void

  • GetEnumList

    System.UInt32[] GetEnumList(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32[]

    • GetError
    string GetError()
    

    Returns: string

  • GetFixed32

    System.UInt32 GetFixed32(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetFixed32Count
    System.UInt32 GetFixed32Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetFixed32List

    void GetFixed32List(System.UInt32 fieldId, System.UInt32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* buffer

    Returns: void

    • GetFixed32List
    System.UInt32[] GetFixed32List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32[]

  • GetFixed64

    System.UInt64 GetFixed64(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt64

    • GetFixed64Count
    System.UInt32 GetFixed64Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetFixed64List

    System.UInt64[] GetFixed64List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt64[]

    • GetFixed64List
    void GetFixed64List(System.UInt32 fieldId, System.UInt64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64* buffer

    Returns: void

  • GetFloat

    float GetFloat(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: float

    • GetFloatCount
    System.UInt32 GetFloatCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetFloatList

    float[] GetFloatList(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: float[]

    • GetFloatList
    void GetFloatList(System.UInt32 fieldId, float* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • float* buffer

    Returns: void

  • GetInt32

    System.Int32 GetInt32(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32

    • GetInt32Count
    System.UInt32 GetInt32Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetInt32List

    System.Int32[] GetInt32List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32[]

    • GetInt32List
    void GetInt32List(System.UInt32 fieldId, System.Int32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* buffer

    Returns: void

  • GetInt64

    System.Int64 GetInt64(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64

    • GetInt64Count
    System.UInt32 GetInt64Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetInt64List

    System.Int64[] GetInt64List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64[]

    • GetInt64List
    void GetInt64List(System.UInt32 fieldId, System.Int64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* buffer

    Returns: void

  • GetObject

    SchemaObject GetObject(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: SchemaObject

    • GetObjectCount
    System.UInt32 GetObjectCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetSfixed32

    System.Int32 GetSfixed32(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32

    • GetSfixed32Count
    System.UInt32 GetSfixed32Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetSfixed32List

    void GetSfixed32List(System.UInt32 fieldId, System.Int32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* buffer

    Returns: void

    • GetSfixed32List
    System.Int32[] GetSfixed32List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32[]

  • GetSfixed64

    System.Int64 GetSfixed64(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64

    • GetSfixed64Count
    System.UInt32 GetSfixed64Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetSfixed64List

    void GetSfixed64List(System.UInt32 fieldId, System.Int64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* buffer

    Returns: void

    • GetSfixed64List
    System.Int64[] GetSfixed64List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64[]

  • GetSint32

    System.Int32 GetSint32(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32

    • GetSint32Count
    System.UInt32 GetSint32Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetSint32List

    System.Int32[] GetSint32List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int32[]

    • GetSint32List
    void GetSint32List(System.UInt32 fieldId, System.Int32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int32* buffer

    Returns: void

  • GetSint64

    System.Int64 GetSint64(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64

    • GetSint64Count
    System.UInt32 GetSint64Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetSint64List

    System.Int64[] GetSint64List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.Int64[]

    • GetSint64List
    void GetSint64List(System.UInt32 fieldId, System.Int64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.Int64* buffer

    Returns: void

  • GetString

    string GetString(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: string

    • GetStringCount
    System.UInt32 GetStringCount(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetUint32

    System.UInt32 GetUint32(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

    • GetUint32Count
    System.UInt32 GetUint32Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetUint32List

    void GetUint32List(System.UInt32 fieldId, System.UInt32* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32* buffer

    Returns: void

    • GetUint32List
    System.UInt32[] GetUint32List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32[]

  • GetUint64

    System.UInt64 GetUint64(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt64

    • GetUint64Count
    System.UInt32 GetUint64Count(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt32

  • GetUint64List

    void GetUint64List(System.UInt32 fieldId, System.UInt64* buffer)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt64* buffer

    Returns: void

    • GetUint64List
    System.UInt64[] GetUint64List(System.UInt32 fieldId)
    

    Parameters:

    • System.UInt32 fieldId

    Returns: System.UInt64[]

  • GetUniqueFieldIdCount

    System.UInt32 GetUniqueFieldIdCount()
    

    Returns: System.UInt32

    • GetUniqueFieldIds
    System.UInt32[] GetUniqueFieldIds()
    

    Returns: System.UInt32[]

  • GetWriteBufferLength

    System.UInt32 GetWriteBufferLength()
    

    Returns: System.UInt32

    • IndexBool
    bool IndexBool(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: bool

  • IndexBytes

    System.Byte[] IndexBytes(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Byte[]

    • IndexBytesBuffer
    System.Byte* IndexBytesBuffer(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Byte*

  • IndexBytesLength

    int IndexBytesLength(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: int

    • IndexDouble
    double IndexDouble(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: double

  • IndexEntityId

    System.Int64 IndexEntityId(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int64

    • IndexEnum
    System.UInt32 IndexEnum(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.UInt32

  • IndexFixed32

    System.UInt32 IndexFixed32(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.UInt32

    • IndexFixed64
    System.UInt64 IndexFixed64(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.UInt64

  • IndexFloat

    float IndexFloat(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: float

    • IndexInt32
    System.Int32 IndexInt32(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int32

  • IndexInt64

    System.Int64 IndexInt64(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int64

    • IndexObject
    SchemaObject IndexObject(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: SchemaObject

  • IndexSfixed32

    System.Int32 IndexSfixed32(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int32

    • IndexSfixed64
    System.Int64 IndexSfixed64(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int64

  • IndexSint32

    System.Int32 IndexSint32(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int32

    • IndexSint64
    System.Int64 IndexSint64(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.Int64

  • IndexString

    string IndexString(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: string

    • IndexUint32
    System.UInt32 IndexUint32(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.UInt32

  • IndexUint64

    System.UInt64 IndexUint64(System.UInt32 fieldId, System.UInt32 index)
    

    Parameters:

    • System.UInt32 fieldId
    • System.UInt32 index

    Returns: System.UInt64

    • MergeFromBuffer
    void MergeFromBuffer(System.Byte* buffer, System.UInt32 bufferLength)
    

    Parameters:

    • System.Byte* buffer
    • System.UInt32 bufferLength

    Returns: void

  • MergeFromBuffer

    void MergeFromBuffer(System.Byte[] buffer)
    

    Parameters:

    • System.Byte[] buffer

    Returns: void

    • Serialize
    System.Byte[] Serialize()
    

    Returns: System.Byte[]

  • ShallowCopy

    void ShallowCopy(SchemaObject other)
    

    Parameters:

    Returns: void

    • ShallowCopyField
    void ShallowCopyField(SchemaObject other, System.UInt32 fieldId)
    

    Parameters:

    Returns: void

Improbable.Worker.CInterop.SnapshotInputStream class

Implements System.IDisposable
Summary A stream for reading snapshots one entity at a time.

Constructors

SnapshotInputStream(string path, SnapshotParameters snapshotParams)

Description: Creates a SnapshotInputStream to read the snapshot file from the given path. Throws a StreamBadStateException if the SnapshotInputStream failed to be initialized and is not in a usable state. Further calls to the stream are ignored and this exception is re-thrown.
Parameters:

Methods

  • Dispose

    void Dispose()
    

    Returns: void

    • HasNext
    bool HasNext()
    

    Returns: bool - True if SnapshotInputStream has not reached EOF.

  • ReadEntity

    System.Collections.Generic.KeyValuePair<System.Int64, Entity> ReadEntity()
    

    Description: Loads the next EntityId and Entity pair from the Snapshot. Throws a StreamBadStateException if a snapshot internal error occurred and the stream is not in a usable state. Throws a StreamInvalidDataException if the last entity read operation on the snapshot stream failed and the stream is still in a usable state. Throws a System.IO.EndOfStreamException if the end of Snapshot was reached while trying to execute the last entity read operation.
    Returns: System.Collections.Generic.KeyValuePair<System.Int64, Entity>

    Improbable.Worker.CInterop.SnapshotOutputStream class

    Implements System.IDisposable
    Summary A stream for writing snapshots one entity at a time.

    Constructors

    SnapshotOutputStream(string path, SnapshotParameters snapshotParams)
    

Description: Creates a SnapshotOutputStream to write to the snapshot file in the given path. Throws a StreamBadStateException if the SnapshotOutputStream failed to be initialized and is not in a usable state.
Parameters:

Methods

  • Dispose

    void Dispose()
    

    Returns: void

    • WriteEntity
    string WriteEntity(System.Int64 entityId, Entity entity)
    

    Description: Writes the EntityId and Entity pair to the output stream. Throws a StreamBadStateException if a snapshot internal error occurred and the stream is not in a usable state. Throws a StreamInvalidDataException if the last entity write operation on the snapshot stream failed and the stream is still in a usable state.
    Parameters:

    • System.Int64 entityId
    • Entityentity

    Returns: string

Improbable.Worker.CInterop.SnapshotParameters class

Fields and Properties

  • System.Collections.Generic.Dictionary<uint, ComponentVtable> ComponentVtables - Vtables used by the connection when saving and reading snapshots. Separate behavior can be specified per component type, per handle type (data, update, command request, command response) and per direction (serialization, deserialization).

  • ComponentVtableDefaultComponentVtable = null - Vtables used by the connection when saving and reading snapshots. Separate behavior can be specified per component type, per handle type (data, update, command request, command response) and per direction (serialization, deserialization).

  • JsonParametersJsonParameters = null - JSON parameters. By default, if this parameter is not specified, then SnapshotOutputStream will default to writing JSON in compact form. Used only if the snapshot type is a JSON snapshot.

  • SchemaBundleSchemaBundle = null - The schema bundle used when dealing with a JSON snapshot, used to understand the structure of the JSON.

  • SnapshotTypeSnapshotType = SnapshotType.Binary

Improbable.Worker.CInterop.SnapshotType enum

Fields

Improbable.Worker.CInterop.StatusCode enum

Fields

  • StatusCodeApplicationError - The command was delivered successfully, but the handler rejected it. Either the command was delivered to a worker that explicitly rejected it by calling SendCommandFailure, or the request data was rejected as invalid by SpatialOS itself. In the latter case, in particular, SendCreateEntityRequest will return ApplicationError along with an appropriate error message if the entity ID is already in use, and SendEntityQueryRequest will return ApplicationError if the result set is incomplete (see the EntityQueryResponseOp docs).

  • StatusCodeAuthorityLost - The request could not be executed by a worker, either because the worker lost authority over the entity while handling the request, the entity was deleted while handling the request, or no worker was authoritative over the entity at all. Assuming the deployment isn’t irrecoverably broken (e.g. due to misconfigured loadbalancing or crash-looping workers) this is a transient failure and can be retried immediately.

  • StatusCodeInternalError - Some other error occurred. This likely indicates a bug in SpatialOS and should be reported.

  • StatusCodeNotFound - The target entity did not exist, or did not have the target component. This probably means the entity either hasn’t been created yet or has already been deleted. It might make sense to retry the request if there is reason to believe the entity hasn’t yet been created but will be soon.

  • StatusCodePermissionDenied - The worker did not have the required permissions to make the request. Permissions do not change at runtime, so it doesn’t make sense to retry the request.

  • StatusCodeSuccess - The request was successfully executed and returned a response.

  • StatusCodeTimeout - The request timed out before a response was received. It can be retried, but carefully - this usually means the deployment is overloaded, so some sort of backoff should be used to avoid making the problem worse. This can also be caused by the target worker’s handling code failing to respond to the command at all, perhaps due to a bug in its implementation.

Improbable.Worker.CInterop.SteamCredentials class

Summary Parameters for authenticating using Steam credentials.

Fields and Properties

  • string DeploymentTag - Deployment tag to request access for. If non-empty, must match the following regex: [A-Za-z0-9][A-Za-z0-9_]

  • string Ticket - Steam ticket for the steam app ID and publisher key corresponding to the project name specified in the LocatorParameters. Typically obtained from the steam APIs.

Improbable.Worker.CInterop.StreamBadStateException class

Implements System.IO.IOException
Summary When thrown, this exception signals that an internal stream error occurred and the stream is not in a usable state.

Improbable.Worker.CInterop.StreamInvalidDataException class

Implements System.IO.IOException
Summary When thrown, this exception signals that the data processed in the last operation was not valid and the operation failed. The stream is still in a usable state.

Improbable.Worker.CInterop.TcpNetworkParameters class

Summary Parameters for configuring a TCP connection. Used by NetworkParameters.

Fields and Properties

  • byte MultiplexLevel = IMPROBABLE.WORKER.DEFAULTS.TCP_MULTIPLEX_LEVEL - The number of multiplexed TCP connections to use. Updates for entities are sharded across connections: the higher the multiplex level, the fewer entities might be impacted by a delayed update. Messages across connections cannot be packed into the same TCP packet. This might result in higher bandwidth usage. Increasing the number of multiplexed streams might also increase CPU usage.

  • bool NoDelay =TcpNoDelay - Whether to enable TCP_NODELAY.

  • uint ReceiveBufferSize =TcpReceiveBufferSize - Size in bytes of the TCP receive buffer.

  • uint SendBufferSize =TcpSendBufferSize - Size in bytes of the TCP send buffer.

Improbable.Worker.CInterop.TcpTransportParameters class

Summary Parameters for configuring the TCP transport layer within the modular TCP network stack. Used by ModularTcpNetworkParameters.
Remarks Not to be confused with TcpNetworkParameters, which are parameters for the whole ModularTcp connection type.

Fields and Properties

  • uint FlushDelayMillis =TcpFlushDelayMillis - Maximum delay after which to flush data to the network. If non-zero, data may be delayed for up to this many milliseconds in order to pack more data into network packets and save bandwidth. If set to zero, data will always be sent immediately without delay. This will prevent manual flushes from having any effect, and may render compression ineffective.

Improbable.Worker.CInterop.ThreadAffinityParameters class

Summary Parameters for configuring the affinity of threads started by SpatialOS workers. This is only intended for use on console, however support exists on all platforms except macOS where there is no strict concept of thread affinity. Instead, we set the thread policy which expresses hints to the scheduler. Affinity masks are bit masks where setting 1 in the nth least significant position means the thread will be permitted to run on the nth core. If an affinity mask is set to zero, the group of threads using that mask will have no thread affinity and be allowed to run on any logical core. Setting the affinity mask to permit a core index which does not exist is undefined behavior, and we are not performing any checks at runtime whether the logical core count accommodates the affinity masks.

Fields and Properties

  • ulong ReceiveThreadsAffinityMask = 0 - Affinity mask for threads related to receiving data from the runtime.

  • ulong SendThreadsAffinityMask = 0 - Affinity mask for threads related to sending data to the runtime.

  • ulong TemporaryThreadsAffinityMask = 0 - Affinity mask for short-lived threads.

Improbable.Worker.CInterop.UpdateParameters struct

Summary Component update parameters. Used to modify the behavior of sending a component update.

Fields and Properties

  • ComponentUpdateLoopbackLoopback - How the component update should be delivered to the worker sending the update, if at all.

Improbable.Worker.CInterop.Alpha namespace

Improbable.Worker.CInterop.Alpha.DevelopmentAuthentication class

Methods

  • CreateDevelopmentLoginTokensAsync

    static Future<LoginTokensResponse> CreateDevelopmentLoginTokensAsync(string hostname, ushort port, LoginTokensRequest request)
    

    Description: Calls the Development Login Service to generate login tokens.
    Parameters:

    • string hostname - The hostname of the Development Login Service. Typically “locator.improbable.io”.
    • ushort port - The port number used to connect to the Development Login Service. Typically 443.
    • LoginTokensRequestrequest - The request to send to the Development Login Service.

    Returns: Future<LoginTokensResponse> - A future object for the login tokens response.

    • CreateDevelopmentPlayerIdentityTokenAsync
    static Future<PlayerIdentityTokenResponse> CreateDevelopmentPlayerIdentityTokenAsync(string hostname, ushort port, PlayerIdentityTokenRequest request)
    

    Description: Calls the Development Authentication Service to generate a player identity token.
    Parameters:

    • string hostname - The hostname of the Development Authentication Service. Typically “locator.improbable.io”.
    • ushort port - The port number used to connect to the Development Authentication Service. Typically 443.
    • PlayerIdentityTokenRequestrequest - The request to send to the Development Authentication Service.

    Returns: Future<PlayerIdentityTokenResponse> - A future object for the player identity token response.

Improbable.Worker.CInterop.Alpha.LoginTokenDetails struct

Summary A single login token with additional details.

Fields and Properties

  • string DeploymentId - The UUID of the deployment.

  • string DeploymentName - The name of the deployment.

  • string LoginToken - The generated login token for this deployment.

  • System.Collections.Generic.List<string> Tags - The tags that the deployment contains.

Methods

  • ToString

    string ToString()
    

    Returns: string

    Improbable.Worker.CInterop.Alpha.LoginTokensRequest class

    Summary The parameters used when creating login tokens.

    Fields and Properties

    • uint? DurationSeconds - The lifetime duration of the requested login tokens.
      This is an optional field. If a value is not given, a default of 15 minutes will be used.

    • string PlayerIdentityToken - The player identity token of the player.

    • bool UseInsecureConnection - Whether to use an insecure (non-TLS) connection for local development

    • string WorkerType - The worker type for which the requested login tokens are scoped for.

    Improbable.Worker.CInterop.Alpha.LoginTokensResponse struct

    Summary The result of creating login tokens.

    Fields and Properties

    • ConnectionStatusConnectionStatus - Information about the status of the request.

    • System.Collections.Generic.List<LoginTokenDetails> LoginTokens - The list of login tokens.

    Methods

    • ToString
    string ToString()
    

    Returns: string

Improbable.Worker.CInterop.Alpha.PlayerIdentityTokenRequest class

Summary The parameters used when creating a player identity token (PIT).

Fields and Properties

  • string DevelopmentAuthenticationToken - The Development Authentication token used for exchanging the player identity token.

  • string DisplayName - The player’s display name.
    This is an optional field.

  • uint? DurationSeconds - The lifetime duration of the requested PIT.
    This is an optional field. If a value is not given, a default of 24 hours will be used.

  • string Metadata - Additional metadata that is stored within the PIT. You can use this to securely attach extra attributes in a format you choose (e.g. JSON payload).
    This is an optional field.

  • string PlayerId - The ID of the player to generate PIT for.

  • bool UseInsecureConnection - Whether to use an insecure (non-TLS) connection for local development.

Improbable.Worker.CInterop.Alpha.PlayerIdentityTokenResponse struct

Summary The result of creating a player identity token.

Fields and Properties

  • ConnectionStatusConnectionStatus - Information about the status of the request.

  • string PlayerIdentityToken - The returned player identity token.

Methods

  • ToString

    string ToString()
    

    Returns: string

    Improbable.Worker.CInterop.Query namespace

    Improbable.Worker.CInterop.Query.AndConstraint class

    Implements IConstraint
    Inherits from System.Collections.Generic.List<IConstraint>
    Summary Constrains a query by the conjunction of one or more constraints.

    Constructors

    AndConstraint()
    

AndConstraint(System.IEnumerable<IConstraint> enumerator)

Parameters:

  • System.IEnumerable<IConstraint> enumerator

Improbable.Worker.CInterop.Query.ComponentConstraint class

Implements IConstraint
Summary Constrains a query to match only entities that have a specific component.

Fields and Properties

  • uint ComponentId

Constructors

ComponentConstraint(uint componentId)

Parameters:

  • uint componentId

Improbable.Worker.CInterop.Query.CountResultType class

Implements IResultType
Summary Indicates that a query should return the number of entities it matched.

Improbable.Worker.CInterop.Query.EntityIdConstraint class

Implements IConstraint
Summary Constrains a query to match only entities with a particular ID.

Fields and Properties

  • System.Int64 EntityId

Constructors

EntityIdConstraint(System.Int64 entityId)

Parameters:

  • System.Int64 entityId

Improbable.Worker.CInterop.Query.EntityQuery struct

Summary Represents a global query for entity data across the simulation.

Fields and Properties

  • IConstraintConstraint - The filter criteria of the query.

  • IResultTypeResultType - Describes the way the result should be represented.

Improbable.Worker.CInterop.Query.IConstraint interface

Summary Base class for entity query constraints

Improbable.Worker.CInterop.Query.IResultType interface

Summary Base class for entity query result types.

Improbable.Worker.CInterop.Query.NotConstraint class

Implements IConstraint
Summary Constrains a query to match entities that do not match the given subconstraint.

Fields and Properties

Constructors

NotConstraint()

NotConstraint(IConstraint constraint)

Parameters:

Improbable.Worker.CInterop.Query.OrConstraint class

Implements IConstraint
Inherits from System.Collections.Generic.List<IConstraint>
Summary Constrains a query by the disjunction of one or more constraints.

Constructors

OrConstraint()

OrConstraint(System.IEnumerable<IConstraint> enumerator)

Parameters:

  • System.IEnumerable<IConstraint> enumerator

Improbable.Worker.CInterop.Query.SnapshotResultType class

Implements IResultType
Summary Indicates that a query should return a component data snapshot for each matched entity.

Fields and Properties

  • System.Collections.Generic.List<uint> ComponentIds - If nonempty, filters the components returned in the snapshot for each entity.

Constructors

SnapshotResultType()

SnapshotResultType(System.Collections.Generic.List<uint> componentIds)

Parameters:

  • System.Collections.Generic.List<uint> componentIds - Components to filter for.

Improbable.Worker.CInterop.Query.SphereConstraint class

Implements IConstraint
Summary Constrains a query to match only entities whose position lies within a given sphere.

Fields and Properties

  • double Radius - The radius of the sphere.

  • double X - The X-coordinate of the center of the sphere.

  • double Y - The Y-coordinate of the center of the sphere.

  • double Z - The Z-coordinate of the center of the sphere.

Constructors

SphereConstraint(double x, double y, double z, double radius)

Parameters:

  • double x
  • double y
  • double z
  • double radius

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums