On Wed, Nov 26, 2003 at 12:39:38AM +0200, Juhana Sadeharju wrote:
I have written and I'm writing a message system
where client sends,
e.g., the following msg to the server:
read <file id> <loc> <len> <addr> <return value>
which reads a block of audio from a file to a (shared) memory
location.
why not use OpenSoundControl [1,2]? it basically does what you
describe and some more, has a (more or less complete) specification
and is used by a whole bunch of applications.
I did not see the return value in your system (and
don't figure
out how one goes without it). The server sends both the result
and the given return value back to the client. The return value
could be something which only the client knows, e.g., array
index, memory address, text. Something which associates the
result with the request.
you could do that in OSC by sending a binary 'context' argument (a
blob in OSC parlance) containing a valid OSC message and dispatching
that when you get the server reply.
<sk>
[1]
http://www.cnmat.berkeley.edu/OpenSoundControl/
[2]
http://www.cnmat.berkeley.edu/OpenSoundControl/OSC-spec.html