# Function: disconnect

disconnect(tokenForleaveBeforeJoin?: string): Promise‹any›

结束帧同步服务的连接

description 用法1:连接帧同步房间后,用于玩家主动离开房间,不与end同时使用。 用法2: 若连接帧同步连接过久仍未成功,取消连接帧同步房间

# 参数:

属性 类型 描述
tokenForleaveBeforeJoin? string 默认不需要传该参数,但是微信平台,并且在调用connect连接帧同步之前,就调用disconnect来离开帧同步房间,则需要传该参数

# 返回值:

Promise‹any›