[FR] add to examples file
Hi,
I'm working through the examples file, and I've run into two roadblocks:
- I am not able to find a way to close a socket once it's opened
- It would be great to see how to actually pull apart a bundle and do something with it. Right now I just get a message object, but I don't really know how to open it up and see what's inside.
if you are using usocket have a look at socket-close function. in one of the examples, sending is wrapped in unwind-protect which should automatically close the socket after each message is sent. if you want to keep it open to send more messages, you can close the socket explicitly when complete.
(unwind-protect
(socket-send s b (length b))
(when s (socket-close s)))))
A bundle should be just a list of messages, so if you are using decode-bundle you can try accessing each element of the list (for example). have a look at osc-dispatch.lisp to see how you can setup functions to respond to various incoming osc messages.
The examples are a bit sparse.
...and If you do have any simple examples feel free to add them.
Thanks! Will give it a try when I have a free moment :-) Keeping the issue open for now, will add to the examples once I have something to add...
No problem. I'm planning to put together a more detailed manual and add a few more examples for the 1.0 release (see #19) but the development cycle is still pretty glacial...
Take it nice and slow :-) I managed to get it working. For some reason I didn't get a list the first time I tried, but now I'm getting a nice, beautiful list that makes it easy to parse and do stuff with. I am also keeping the port open until I close it manually.