sockets - Adobe AIR desktop application communicate with Processing application -
I have a processing application that should talk to desktop Adobe Eye app. What might be the best option to consider the following?
If sockets have an answer, what kind of socket, UDP (datagram class), server socket or just plain socket?
- live on the same machine
Latin important, small better
- Sending signal is small, including 3 values
- Communication only 1 The method is, processing on adobe air
You can use it on the processing side:
import oscP5 *; Import netP5 *; OSPP5 OSC; Where NetAddress; Zero setup () {frameRate (25); Text ("Click to send \ nOSC"), 5, 50); OSC = new OSPP5 (this, 12000); Where = New NetAddress ("127.0.0.1", 8082); } Zero draw () {} zero mouse pressed () {what is osmessage = new Oscar message ("/ straps"); what.add (193.4509887695313); osc.seend (what, ou); } In AIR you will actually use it. Luckily you can use something like that in the original AS3 sample, like OSS packet:
< code> package {import flash.display.Sprite; Import flash.utils.getDefinitionByName; Import org.tuio.connectors.UDPConnector; Import org.tuio.osc *; Public Class BasicOSC Sprite Tool IOSCConnectorListener (Private var oscSocket: UDPConnector; Personal Construction OSCSERVER: string = "127.0.0.1"; Personal Construction Port: int = 8082; Public Function BasicOSC (try {oscSocket = new UDPConnector (OSCSERVER, PORT) ; oscSocket.addListener (this); trace (this, "osc ready");} hold (e: error) {trace (e.getStackTrace ());}} public event acceptOSCPacket (OSCPET: OSCPKette): zero {// Send message to OSC here: OSCMessage OSCMack as OSCMessage; trace ("Message from:", message.address, "at", new day For trace (var i: int = 0; i & lt; message.arguments.length; i ++) trace ("\ targs [" + i + "]", message.arguments [i]) ;}}} This is something I have used:
Comments
Post a Comment