From: Chandrasekhar R. <cra...@ac...> - 2006-09-18 19:46:53
|
Martin Kaltenbrunner schrieb: > Although the UDP transport is fully functional right now, I don't see > any point of paying a mobile phone provider for transmitting OSC > messages to a device next to myself, so I will implement something like > a OscPortInBT and OscPortOutBT in order to allow local Bluetooth > communication. Maybe the class hierarchy for the transport layer could > be changed accordingly to something like: > > OscPort > | | > OscPortIn OscPortOut > | | > OscPortInUDP OscPortOutUDP > OscPortInTCP OscPortOutTCP > OscPortInBT OscPortOutBT I just took a quick look at the code -- I think the better solution would be to make OSCPortIn/OSCPortOut interfaces and to create a OSCPortFactory class that you would use to get {in/out} ports. Done this way, client code should become more portable and not have to care if the transport is UDP or TCP or serial or what. This would also make it possible to create an OSCInOutPort that multiplexes the same socket for input and output on Java 1.4 where the java.nio package exists and offers select (at least, so I'm told). > If you want I can add the TCP layer for J2SE and UDP/TCP layer for J2ME > right away, I will probably need some time to do the Bluetooth part I > reckon. That sounds good. > I have an important request regarding the portability of javaosc. > Right now it seems that javaosc is compiling on J2SE as well as on J2ME > Personal profile (based on JDK 1.3.1) and on J2ME MIDlet profile. > I didn't try it, but I reckon it even compiles on JDK 1.1 > This is really great like that, and I think with little effort this > portability could be maintained in the future changes to javaosc. This should be the case -- it was designed to work on JDK 1.1 and did so, at least in 2004. I agree that this is very important. It would be nice if we could device a way to keep JDK 1.1 compability, but also make it possible to take advantage of new Java features like the afforementioned select. Maybe with a little bit of reflection and ant-file editing this would be possible? - sekhar -- C. Ramakrishnan cra...@ac... Illposed Software http://www.illposed.com |