public void Connect() { //setup TUIO client connection m_Client.connect(); if (this.m_Client.isConnected()) { Debug.Log("Listening to TUIO port " + m_Client.getPort() + "."); } else { Debug.LogError("Failed to connect to TUIO port " + m_Client.getPort() + "."); } }
public static void Main(String[] argv) { TuioDump demo = new TuioDump(); TuioClient client = null; switch (argv.Length) { case 1: int port = 0; port = int.Parse(argv[0], null); if (port > 0) { client = new TuioClient(port); } break; case 0: client = new TuioClient(); break; } if (client != null) { client.addTuioListener(demo); client.connect(); Console.WriteLine("listening to TUIO messages at port " + client.getPort()); } else { Console.WriteLine("usage: mono TuioDump [port]"); } }
public void addtuioclient() { client = null; client = new TuioClient(Convert.ToInt32(tuio_port.Text)); if (client != null) { client.addTuioListener(Listener); client.connect(); Console.WriteLine("listening to TUIO messages at port " + client.getPort()); timer1 = new Timer(); timer1.Interval = 100; timer1.Enabled = true; timer1.Tick += new System.EventHandler(OnTimerEvent); } else { Console.WriteLine("usage: java TuioDump [port]"); } }