public void sendMessage(String address, String data) { OscBundle bundle = new OscBundle(solidworksPlugin); OscMessage message = new OscMessage(solidworksPlugin, address, data); bundle.Append(message); bundle.Send(openFrameworks); }
// sends the messages stored in messagesThisFrame as a bundle, then clears messagesThisFrame private void SendBundle() { OscBundle frameBundle = new OscBundle(localEndPoint); foreach (OscMessage message in messagesThisFrame) { frameBundle.Append(message); } //UnityEngine.Debug.Log("sending bundle"); frameBundle.Send(externalEndPoint); messagesThisFrame.Clear(); }
public void RunWorker() { try { while (sSendMessages) { while (_oscMessageQueue.Count == 0) { Thread.Sleep(1000); } OscBundle bundle = (OscBundle)_oscMessageQueue.Dequeue(); switch (TransportType) { case TransportType.Udp: bundle.Send(Destination); break; case TransportType.Tcp: bundle.Send(); break; } Thread.Sleep(10); } } catch (Exception ex) { Console.WriteLine(ex.Message); } if (TransportType == TransportType.Tcp) { sOscClient.Close(); } }
public static void SendOSCMessages(List<string> Addresses) { sourceEndPoint = new IPEndPoint(serverIPAddress, 53000); OscBundle bundle = new OscBundle(sourceEndPoint); foreach (string Address in Addresses) bundle.Append(OSCMessage.CreateMessage(Address)); bundle.Send(sourceEndPoint); }