websockets - if I don't want to send anything
Date | 2015-09-12 06:37 |
From | Tarmo Johannes |
Subject | websockets - if I don't want to send anything |
Attachments | None None |
HI,
Once again - the websocket opcode is great. I tried, I can send info also from several any clients simultaneously (have to done much extensive testing though)
Some thoughts:
The syntax
xout1[, xout2, xout3, ..., xoutN] websocket iport, xin1[, xin2, xin3, ..., xinN]
impies that I also have to send something back to the socket. But if I don't? (ie if I don't set up a receiving socket in javascript or other client, it fails).
For example if I have line in csound
knote websocket iport, klfo
and I comment out line in javascript (or just don't set it up): //var websocketIn = new WebSocket("ws://192.168.1.220:22022", "klfo");
the connection gets established but Csound complains:
websocket: variable klfo data not sent,buffer overrrun
Is it possible to have perhaps an alternative opcode just to receive data? Or send and receive separately like OSCsend and OSClisetn?
Thanks! tarmo
Alos I think the opcode should not print out this warning unless there is connected sockets, otherwise it fills up the console completeley.
|
Date | 2015-09-12 17:40 |
From | Ed Costello |
Subject | Re: websockets - if I don't want to send anything |
Attachments | None None |
Thanks for the feedback Tarmo, I think I was sort of hoping that the opcode would 'just work' when given no inputs or no outputs but it fails at the parser stage. Is it possible to write a polymorphic opcode that takes N inputs & N outputs, 1 inputs & N outputs and N inputs & 0 outputs? I'd much rather do that than have different opcodes as it would be a lot cleaner to use. Ed On Sat, 12 Sep 2015 at 07:37 Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
-- Edward Costello
|
Date | 2015-09-15 10:18 |
From | Ed Costello |
Subject | Re: websockets - if I don't want to send anything |
Attachments | None None |
Tarmo, I think if you just don't give the klfo input argument like this: knote websocket iport It should only receive data and not complain. That's what is happening for me on my system. Ed On Sat, 12 Sep 2015 at 18:40 Ed Costello <phasereset@gmail.com> wrote:
-- Edward Costello
|