On Fri, 28 Apr 2006, Martin Peach wrote:
Mathieu Bouchard wrote:
bidi connections are nice, so let's merge the send/receive parts together: net/tcpsocket net/udpsocket
But we don't have midisocket, just midiin and midiout, and it's easier to patch that way. For instance I'm using OSC to talk to microcontrollers on one port but they reply on another. To me it makes more sense to have separate send and receive objects
You gotta be kidding. A lot of protocols that Pd could support require a bidirectional connection. That is, you can't find a version of the protocol that works by first establishing a socket one way and then connecting back the other way. It wouldn't work in masquerading IP situations either.
DesireData is going to have those byte-based sockets for sure. The client-server protocol of Pd itself is bidi, and I believe a user ought to be able to do the same! This means that i want one class for both send and receive.
tcpreceive accepts multiple incoming connections (maximum is set by a #define in the code but it could be a creation argument if needed), and updreceive accepts any messages sent to its port number. Both also output the ip address of the source of each incoming message.
But receive is reserved for servers, and servers are reserved for receiving, while sending is reserved for clients, and clients can only send. Why?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada