private void onRecFailed(SocketIOEvent obj) { if (parent.reconnectMode) { parent.reconnectMode = false; onReconnectFailed(); this.onDCCallBack = null; io.Close(); } }
public void Disconnection() { socket.Close(); connecting = false; name = ""; id = ""; }
void OnDisable() { if (_Socket) { _Socket.Close(); } }
/// <summary> /// Close this instance. /// </summary> internal void Close() { if (IsConnected()) { socket.sid = ""; socket.Close(); } }
void DoClose() { if (socket != null) { socket.Close(); socket = null; } }
public void StopSocket() { socketIo.AllOff(); socketError = false; socketIo.Close(); connectBtn.sprite = connectIcon; socketURL.interactable = true; }
public virtual void OnClose(SocketIOEvent e) { Debug.Log("[SocketIO] Close: " + e.data); if (socket) { if (socket.IsConnected) { socket.Close(); } } }
public void Disconnect() { if (socket.IsConnected) { socket.Close(); } else { Debug.LogWarning("Socket is not connected."); } }
public void Disconnect() { if (!socket.IsConnected) { return; } Debug.Log("Disconnecting from game lobby service..."); socket.Close(); RoomCode = string.Empty; ClientCount = 0; }
private void Disconnect() { socket.Off("error", ErrorCallback); socket.Off("SUCCESS_CONNECT", OnSuccessConnect); socket.Off("INPUTTIME", OnSuccessSendData); socket.Close(); if (UIManager.Instance.IsOpened <ConnectingUI>()) { UIManager.Instance.CloseUI <ConnectingUI>(); } }
private void Awake() { GameObject socketObj = GameObject.Find("SocketIO"); if (socketObj != null) { SocketIOComponent socket = socketObj.GetComponent <SocketIOComponent>(); socket.Close(); GameObject.Destroy(socketObj); GameObject.Destroy(GameObject.Find("PlayerData")); } }
public static void SetDisconnect() { if (DDASocket.IsConnected) { DDASocket.Emit("gameEnded"); DDASocket.Close(); } if (GameSocket.IsConnected && !DDASocket.IsConnected) { GameSocket.Emit("gameEnded"); GameSocket.Close(); GameSocket = null; } }
public void btnDisconnect_OnClick() { #if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX try { SetWindowTitle(Application.productName); } catch (DllNotFoundException e) { Debug.Log(e.ToString()); } #endif socket.Close(); }
private void Update() { if (!IsClose) { if (pingElapsed >= PingTimeOut) { SocketComponent.Close(); #if UNITY_EDITOR Debugger.Log("Connection Closed"); #endif } Sync?.SyncUpdate(); } }
protected void Start() { socket = GetComponent <SocketIOComponent>(); OnStart(); #if UNITY_EDITOR if (socket.IsConnected) { //Complain at developer and select offending object Debug.LogError("Turn off AutoConnect on SocketIOComponent or it will break a Standalone build"); UnityEditor.Selection.activeGameObject = socket.gameObject; socket.Close(); socket.autoConnect = false; } #endif #region Message Handlers //Connection Accepted socket.On("connect", HandleConnectedToSGServer); //Connected, Send App Handshake with App Info socket.On("AppEndMsg", HandleDisconnected); //Connected, Send App Handshake with App Info //Handshake Accepted socket.On("AppHandshakeMsg", HandleAppHandshake); //App Handshake Accepted //Gamepad Connected socket.On("SGHandshakeMsg", HandleGamepadHandshake); //Handshake a new Gamepad //Gamepad Update socket.On("SGUpdateMsg", HandleGamepadUpdate); //Message for a single gamepad //Gamepad Timing Out socket.On("SGTimingOutMsg", HandleGamepadTimingOut); //Gamepad Timeout Timer has begun //Gamepad Reconnect socket.On("SGReconnectMsg", HandleGamepadReconnect); //Gamepad Reconnected //Gamepad Disconnected socket.On("SGDisconnectMsg", HandleGamepadDisconnected); //Gamepad Disconnected //Latency Calculation socket.On("app-ping", HandlePing); //Ping Request from Server socket.On("app-latency", HandleLatency); //Ping Calculation from server #endregion AssignExtraHandlers(); socket.Connect(); Debug.Log("Connecting..."); }
void OnDisconnect() { socket.Close(); }
void OnDestroy() { Debug.Log("destroy"); socket.Close(); }
public void Close() { socket.Close(); }
public void Disconnect() { socket.Close(); }
internal void Close() { SktIO.sid = ""; SktIO.Close(); }
private void OnApplicationQuit() { timer?.Abort(); SocketComponent?.Close(); }
// can call restart if want generate a new room id public void Restart() { IoComponent.On("disconnect", Reconnect); IoComponent.Close(); }
private void OnDestroy() { socket.Close(); //Close connection }
public void Disconnect() { sIO.Close(); }
public void BackToMenu() { _socket.Close(); SceneManager.LoadScene("menu_ar", LoadSceneMode.Single); }
public void Disconnect() { Log("Disconnecting from Server"); signedIn = false; socket.Close(); }
public void Close() { socket.Close(); UnityEditor.EditorApplication.isPlaying = false; Application.Quit(); }
void OnApplicationQuit() { socket.Close(); }
void OnDisable() { socket.Close(); }
private void CloseConnection(SocketIOEvent e) { socket.Close(); Connected = false; }