Home > @esengine/ecs-framework-monorepo > ITransport > onDisconnect
ITransport.onDisconnect() method
监听客户端断开事件
Signature:
typescript
onDisconnect(handler: (clientId: string, reason?: string) => void): void;
Parameters
Parameter | Type | Description |
---|---|---|
handler | (clientId: string, reason?: string) => void | 处理函数 |
Returns:
void