Home > @esengine/ecs-framework-monorepo > ITransport > onMessage
ITransport.onMessage() method
监听消息接收事件
Signature:
typescript
onMessage(handler: (clientId: string, data: ArrayBuffer | string) => void): void;
1
Parameters
Parameter | Type | Description |
---|---|---|
handler | (clientId: string, data: ArrayBuffer | string) => void | 处理函数 |
Returns:
void