Fantasy
搜索结果

    显示/隐藏目录

    MessageDispatcherComponent 类

    网络消息分发组件。

    继承
    object
    Entity
    MessageDispatcherComponent
    实现
    IEntity
    IPool
    IAssembly
    IDisposable
    继承成员
    Entity.Id
    Entity.RunTimeId
    Entity.IsDisposed
    Entity.Scene
    Entity.Parent
    Entity.Type
    Entity.GetParent<T>()
    Entity.Create<T>(Scene, bool, bool)
    Entity.Create<T>(Scene, long, bool, bool)
    Entity.AddComponent<T>(bool)
    Entity.AddComponent<T>(long, bool)
    Entity.AddComponent(Entity)
    Entity.AddComponent<T>(T)
    Entity.GetComponent<T>()
    Entity.GetComponent(Type)
    Entity.GetComponent<T>(long)
    Entity.GetOrAddComponent<T>(bool)
    Entity.RemoveComponent<T>(bool)
    Entity.RemoveComponent<T>(long, bool)
    Entity.RemoveComponent(Entity, bool)
    Entity.RemoveComponent<T>(T, bool)
    Entity.Deserialize(Scene, bool)
    Entity.ForEachSingleCollection
    Entity.ForEachTransfer
    Entity.ForEachMultiEntity
    Entity.ForEachEntity
    Entity.Dispose()
    Entity.IsPool()
    Entity.SetIsPool(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.Network.Interface
    程序集: Fantasy.Net.dll
    语法
    public sealed class MessageDispatcherComponent : Entity, IEntity, IPool, IAssembly, IDisposable

    属性

    | 编辑本文 查看源代码

    AssemblyIdentity

    声明
    public long AssemblyIdentity { get; set; }
    属性值
    类型 描述
    long

    方法

    | 编辑本文 查看源代码

    GetOpCode(Type)

    根据消息类型获取对应的OpCode。

    声明
    public uint GetOpCode(Type type)
    参数
    类型 名称 描述
    Type type

    消息类型

    返回
    类型 描述
    uint

    消息对应的OpCode

    | 编辑本文 查看源代码

    GetOpCodeType(uint)

    根据OpCode获取对应的消息类型。

    声明
    public Type GetOpCodeType(uint code)
    参数
    类型 名称 描述
    uint code

    OpCode

    返回
    类型 描述
    Type

    OpCode对应的消息类型

    | 编辑本文 查看源代码

    Initialize()

    声明
    public FTask<MessageDispatcherComponent> Initialize()
    返回
    类型 描述
    FTask<MessageDispatcherComponent>
    | 编辑本文 查看源代码

    Load(long)

    程序集加载时调用

    声明
    public FTask Load(long assemblyIdentity)
    参数
    类型 名称 描述
    long assemblyIdentity

    程序集标识

    返回
    类型 描述
    FTask
    | 编辑本文 查看源代码

    MessageHandler(Session, Type, object, uint, uint)

    处理普通消息,将消息分发给相应的消息处理器。

    声明
    public void MessageHandler(Session session, Type type, object message, uint rpcId, uint protocolCode)
    参数
    类型 名称 描述
    Session session

    会话对象

    Type type

    消息类型

    object message

    消息对象

    uint rpcId

    RPC标识

    uint protocolCode

    协议码

    | 编辑本文 查看源代码

    OnUnLoad(long)

    卸载的时候调用

    声明
    public FTask OnUnLoad(long assemblyIdentity)
    参数
    类型 名称 描述
    long assemblyIdentity

    程序集标识

    返回
    类型 描述
    FTask
    | 编辑本文 查看源代码

    ReLoad(long)

    程序集重新加载的时候调用

    声明
    public FTask ReLoad(long assemblyIdentity)
    参数
    类型 名称 描述
    long assemblyIdentity

    程序集标识

    返回
    类型 描述
    FTask
    | 编辑本文 查看源代码

    RouteMessageHandler(Session, Type, Entity, object, uint)

    处理路由消息,将消息分发给相应的路由消息处理器。

    声明
    public FTask RouteMessageHandler(Session session, Type type, Entity entity, object message, uint rpcId)
    参数
    类型 名称 描述
    Session session

    会话对象

    Type type

    消息类型

    Entity entity

    实体对象

    object message

    消息对象

    uint rpcId

    RPC标识

    返回
    类型 描述
    FTask

    实现

    IEntity
    IPool
    IAssembly
    IDisposable

    扩展方法

    JsonHelper.ToJson<T>(T)
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX