Example #1
0
        public static void CreateClient(string clientId, IPAddress destination, int port)
        {
            var client = new OSCClient(destination, port)
            {
                Name = clientId
            };

            Clients.Add(clientId, client);

            if (Instance.ShowDebug)
            {
                Debug.Log("Client " + clientId + " on " + destination + ":" + port + "created.");
            }
        }
Example #2
0
        public static void SendMessage(OSCMessage m, string host, int port)
        {
            if (Instance.LogOutgoing)
            {
                string args = "";
                for (int i = 0; i < m.Data.Count; i++)
                {
                    args += (i > 0 ? ", " : "") + m.Data[i].ToString();
                }

                Debug.Log("[OSCMaster to" + host + ":" + port + " | " + DateTime.Now.ToLocalTime() + "] " + m.Address + " : " + args);
            }

            var tempClient = new OSCClient(System.Net.IPAddress.Loopback, port);

            tempClient.SendTo(m, host, port);
            tempClient.Close();
        }