Skip to content

格式

typescript
NetConversation.Emit(type, args)

所属类: NetConversation

描述

提交数据。

参数

参数名类型描述
typecontructor构造函数
args...params参数信息

返回值

类型描述
T

代码示例

typescript
class TestRequest extends Contract{
    Exescute(msg: string): void {
        Debug.Log("client send :: ", msg);
    }

    Receive(msg: string): void {
        Debug.Log("client receive :: ", msg);
    }
}

NetServer.on_converastion_connect = async (conv: NetConversation) => {
    conv.Emit(TestRequest, "hello world");
}