private void OnLeaveRoom(int code) { WebSocketCloseCode closeCode = WebSocketHelpers.ParseCloseCodeEnum(code); LSLog.Log(string.Format("ROOM: ON LEAVE =- Reason: {0} ({1})", closeCode, code)); _pingThread.Abort(); _pingThread = null; _room = null; if (closeCode != WebSocketCloseCode.Normal && !string.IsNullOrEmpty(_lastRoomId)) { JoinRoomId(_lastRoomId); } }
public void DelegateOnCloseEvent(int closeCode) { this.OnClose?.Invoke(WebSocketHelpers.ParseCloseCodeEnum(closeCode)); }