private void Form_Closing(object sender, System.ComponentModel.CancelEventArgs e) { client.removeTuioListener(this); client.disconnect(); System.Environment.Exit(0); }
private void InitTracking() { if (_client != null && _client.isConnected()) { Debug.LogWarning("Client is already connected. Abort opening another connection."); return; } _eventQueue = new Queue <TuioEvent>(); // Create a new TUIO client and listen for data on the specified port _client = new TuioClient(_udpPort); _client.addTuioListener(this); _client.connect(); if (!_client.isConnected()) { Debug.LogError("Couldn't listen at port " + _udpPort + " for TUIO data. Check if port isn't already in use. (netstat -ano | find \"" + _udpPort + "\")\n(also be sure to kill adb.exe if its still running)"); _client.removeTuioListener(this); _client = null; } else { Debug.Log("Connection establised: listening at port " + _udpPort + " for TUIO data."); } }
public void Disconnect() { if (this.m_Client.isConnected()) { int port = m_Client.getPort(); m_Client.removeTuioListener(this); m_Client.disconnect(); Debug.Log("Stopped listening to TUIO port " + port + "."); } }
public void Disconnect() { if (client == null) { return; } client.removeTuioListener(helper); client.disconnect(); IsRunning = false; }
static void root_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (client != null) { client.removeTuioListener(tm); client.disconnect(); System.Environment.Exit(0); } CompositionTarget.Rendering -= CompositionTarget_Rendering; }
public void removeListener(TuioListener tl) { m_refClt.removeTuioListener(tl); m_iListeners--; //last connection if (m_iListeners == 0) { m_refClt.disconnect(); } }
private void Stop() { _pointerTouchInfos.Clear(); InjectPointerTouchInfos(); if (_tuioClient != null) { _tuioClient.disconnect(); _tuioClient.removeTuioListener(this); _tuioClient = null; } }
public void Stop() { if (client != null) { client.disconnect(); if (listener != null) { client.removeTuioListener(listener); } IsRunning = false; } }
/// <summary> /// Shuts down the reception of tracking data by disconnecting the TUIO client. /// </summary> public void Shutdown() { if (_client != null) { _client.removeTuioListener(this); if (_client.isConnected()) { _client.disconnect(); } _client = null; Debug.Log("Disconnected TUIO client: port is now free."); } }
/// <summary> /// Shuts down the reception of tracking data by disconnecting the TUIO client. /// </summary> public void Shutdown() { if (m_client != null) { m_client.removeTuioListener(this); if (m_client.isConnected()) { m_client.disconnect(); } m_client = null; Debug.Log("--- Disconnected TUIO client: port is now free ---"); } else { // Debug.LogWarning("--- Disconnect failed: No TuioClient object available ---"); } }
private void InitTracking() { while (m_client != null && m_client.isConnected()) { Debug.LogWarning("Client still connecting. Waiting..."); } m_eventQueue = new Queue <TuioEvent>(); // Create a new TUIO client and listen for data on the specified port m_client = new TuioClient(m_udpPort); m_client.addTuioListener(this); m_client.connect(); if (!m_client.isConnected()) { Debug.LogError("Couldn't listen at port " + m_udpPort + " for TUIO data. Check if port isn't already in use. (netstat -ano | find \"" + m_udpPort + "\")\n(also be sure to kill adb.exe if its still running)"); m_client.removeTuioListener(this); m_client = null; } else { //Debug.Log ("--- Connection establised: listening at port " + m_udpPort + " for TUIO data. ---"); } }
public void disconnect() { client.disconnect(); client.removeTuioListener(this); }