Ejemplo n.º 1
0
        public void Send(OscElement element)
        {
            var json  = JSONFactory.buildJSONElement(element);
            var bytes = Encoding.UTF8.GetBytes(json);

                        #if (DEBUG)
            if (!client.Client.Connected)             //Try to reconnect -> Only for debug purposes
            {
                client.Connect(host, port);
            }
                        #endif
            client.Send(bytes, bytes.Length);
        }
Ejemplo n.º 2
0
        public void Send(String bundleName, OscBundle bundle)
        {
            var json  = JSONFactory.buildJSONBundle(bundleName, bundle);
            var bytes = Encoding.UTF8.GetBytes(json);

                        #if (DEBUG)
            if (!client.Client.Connected)             //Try to reconnect -> Only for debug purposes
            {
                client.Connect(host, port);
            }
                        #endif
            client.Send(bytes, bytes.Length);
        }