/** * The TuioClient stops listening to TUIO messages on the configured UDP port */ public void disconnect() { if (receiver!=null) receiver.Close(); receiver = null; aliveObjectList.Clear(); aliveCursorList.Clear(); objectList.Clear(); cursorList.Clear(); freeCursorList.Clear(); frameObjects.Clear(); frameCursors.Clear(); connected = false; }
/** * The TuioClient starts listening to TUIO messages on the configured UDP port * All reveived TUIO messages are decoded and the resulting TUIO events are broadcasted to all registered TuioListeners */ public void connect() { TuioTime.initSession(); currentTime = new TuioTime(); currentTime.reset(); receiver = new OSCReceiver(port); thread = new Thread(new ThreadStart(listen)); // HACK : Set listener thread to background added by frog (@rktut) thread.IsBackground = true; thread.Start(); connected = true; // HACK : Swallowed exception removed by frog (@rktut) }