docs.unity3d.com
    Show / Hide Table of Contents

    Class NetComponent

    Inheritance
    Object
    NetComponent
    Namespace: Unity.Reflect.ActorFramework
    Syntax
    [Component("1b938da3-daf8-433c-acd6-1da100a73887", typeof(NetInputAttribute), typeof(NetOutputAttribute), typeof(NetOutput<>), null, Multiplicity.Any, Multiplicity.Any, null, false)]
    public class NetComponent : IRunnableComponent

    Constructors

    NetComponent(TimerComponent, ActorHandle, Scheduler, Dictionary<ActorHandle, NetComponent>)

    Declaration
    public NetComponent(TimerComponent timer, ActorHandle handle, Scheduler scheduler, Dictionary<ActorHandle, NetComponent> actorSockets)
    Parameters
    Type Name Description
    TimerComponent timer
    ActorHandle handle
    Scheduler scheduler
    Dictionary<ActorHandle, NetComponent> actorSockets

    Methods

    DelayedSend<TData>(TimeSpan, ActorHandle, TData)

    Declaration
    public void DelayedSend<TData>(TimeSpan delay, ActorHandle destination, TData data)
        where TData : class
    Parameters
    Type Name Description
    TimeSpan delay
    ActorHandle destination
    TData data
    Type Parameters
    Name Description
    TData

    Forward<TData>(List<ActorHandle>, NetMessage<TData>)

    Declaration
    public void Forward<TData>(List<ActorHandle> destinations, NetMessage<TData> msg)
        where TData : class
    Parameters
    Type Name Description
    List<ActorHandle> destinations
    NetMessage<TData> msg
    Type Parameters
    Name Description
    TData

    Forward<TData>(ActorHandle, NetMessage<TData>)

    Declaration
    public void Forward<TData>(ActorHandle destination, NetMessage<TData> msg)
        where TData : class
    Parameters
    Type Name Description
    ActorHandle destination
    NetMessage<TData> msg
    Type Parameters
    Name Description
    TData

    Register<TData>(Action<NetContext<TData>>)

    Declaration
    public void Register<TData>(Action<NetContext<TData>> action)
        where TData : class
    Parameters
    Type Name Description
    Action<NetContext<TData>> action
    Type Parameters
    Name Description
    TData

    RegisterOpenGeneric<TData>(Action<NetContext<TData>>)

    Declaration
    public void RegisterOpenGeneric<TData>(Action<NetContext<TData>> action)
        where TData : class
    Parameters
    Type Name Description
    Action<NetContext<TData>> action
    Type Parameters
    Name Description
    TData

    Resume()

    Declaration
    public void Resume()

    Send<TData>(List<ActorHandle>, TData)

    If the same message is sent to many actors, make sure to use this call instead, as there may be some mechanisms tracking the generated message for pooling purpose.

    Declaration
    public void Send<TData>(List<ActorHandle> destinations, TData data)
        where TData : class
    Parameters
    Type Name Description
    List<ActorHandle> destinations
    TData data
    Type Parameters
    Name Description
    TData

    Send<TData>(ActorHandle, TData)

    Declaration
    public void Send<TData>(ActorHandle destination, TData data)
        where TData : class
    Parameters
    Type Name Description
    ActorHandle destination
    TData data
    Type Parameters
    Name Description
    TData

    SendCritical<TData>(List<ActorHandle>, TData)

    Declaration
    public void SendCritical<TData>(List<ActorHandle> destinations, TData data)
        where TData : class
    Parameters
    Type Name Description
    List<ActorHandle> destinations
    TData data
    Type Parameters
    Name Description
    TData

    SendCritical<TData>(ActorHandle, TData)

    Sends a critical message to an actor, bypassing all queued messages. Use this only when a late delivery could crash the application (e.g. critical memory signal). Using this for not-so-critical messages could cause the application to crash because critical signals will be late. This may also add a significant processing overhead because there's no batching.

    Declaration
    public void SendCritical<TData>(ActorHandle destination, TData data)
        where TData : class
    Parameters
    Type Name Description
    ActorHandle destination
    TData data
    Type Parameters
    Name Description
    TData

    Suspend()

    Declaration
    public void Suspend()

    Tick(TimeSpan)

    Declaration
    public TickResult Tick(TimeSpan endTime)
    Parameters
    Type Name Description
    TimeSpan endTime
    Returns
    Type Description
    TickResult
    Implements
    IRunnableComponent.Tick(TimeSpan)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023