Discussion:
Connect to sclang using OSC over TCP
felix
2014-10-09 21:58:52 UTC
Permalink
This should be very easy, but I've never actually done it. I always use
UDP.

but now my packet is too big and I wanted to try TCP.
(UDP will not report to the sender when a packet fails. any point in the
network can fail)

The NetAddr docs state that its opening a TCP connection, but its actually
all UDP.

Sending OSC via UDP to sclang is quite easy. you just open a datagram

UDP always sends messages with host and port.
TCP is connection based and needs to open a connection.

sclang refuses the connection. also does not accept telnet connections.

error - ERROR:Error: connect ECONNREFUSED

sclang -h

-u <network-port-number> Set UDP listening port (default 57120)

so there's a UDP options, but no TCP options. Which suggests sclang does
not accept TCP connections at all and has no mechanism for doing so.

So sclang is strictly UDP, but scsynth can be TCP and sclang can connect to
that over TCP. it can also connect to other apps over TCP.

but it doesn't do incoming.

amirite ?
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Hanns Holger Rutz
2014-10-09 22:20:23 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TCP requires a server. SC-lang can be TCP client but not server. If
you set up a server, SC-lang can establish a connection using NetAddr
- -> connect.

Best, .h.h.
Post by felix
This should be very easy, but I've never actually done it. I always
use UDP.
but now my packet is too big and I wanted to try TCP. (UDP will not
report to the sender when a packet fails. any point in the network
can fail)
The NetAddr docs state that its opening a TCP connection, but its
actually all UDP.
Sending OSC via UDP to sclang is quite easy. you just open a
datagram
UDP always sends messages with host and port. TCP is connection
based and needs to open a connection.
sclang refuses the connection. also does not accept telnet
connections.
error - ERROR:Error: connect ECONNREFUSED
sclang -h
-u <network-port-number> Set UDP listening port (default
57120)
so there's a UDP options, but no TCP options. Which suggests sclang
does not accept TCP connections at all and has no mechanism for
doing so.
So sclang is strictly UDP, but scsynth can be TCP and sclang can
connect to that over TCP. it can also connect to other apps over
TCP.
but it doesn't do incoming.
amirite ?
-- .. http://soundcloud.com/crucialfelix
http://github.com/crucialfelix .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUNwoeAAoJEKZFmaPaYk6Q1HgP/j1g9N6lDRTONgZ8yJl2k0Sf
Ea+esPh66nQiPxFq6vkVEE3m8WWBIzMdvXBSi66+le4zfS98sXvf19dUeQTzt+xq
WPV2yINXXcVARbG/fs7YWTPMmhUPBf5JvImyt03jBeyV7xz6TZt56GWV339ODVwB
8xNcdmoYZyceZX07dEbxSiPbhugsbHUZE7X9eFlySMG3X1/Dr6mzhwA55ESUGzLR
H3eF6drJqp7x5YGxjkEHHuFlaZRU4di5+QKS4TW4aPZ7GgRLl7nefsLl33De0+N9
mSIz6oGhFaiemaGBus/TldQvLqlfd2e7Slqf5KHDW33Z2Kwukvzmuy9UHpw/w+a4
JpQdV+43STtIQwXq2ojKqlPrL3z1Zhk5cJ2x7F3xDQG+LoAzRTMX6GktWYiSm5Ic
Z7DogIJKLcR3lfYDv6U5gVxb5uEWmH34HvKYRT+wUt4yqdX0W0uPhN1Poxm8c6lh
q5KLP1asdOq+bSeH5Du4e3SSe1nqcHJw1tTVs138dQHHoAKITPv5r+qdUUwXkpO1
1dqT5bynnxFWnS2yx2Up2hb7Yzfu72tzFTLNQG0Mp3pezfMWHtIEFibfFDDPiRQ5
1KMLnWBrxKT04EV3AViMqvdULSfeZapDOnk39iqazuXn51yyZRtr+2AfYY3A+MGI
oTe1j3+vAtX5io3zVXWO
=xrBS
-----END PGP SIGNATURE-----

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
felix
2014-10-09 22:49:37 UTC
Permalink
Ah cool, I was hoping you would respond. Thanks for the confirmation.

I pretty much figured that part out.
I could initiate a connection to nodejs from sclang.
Maybe send a UDP message telling it to connect back via TCP.

but its probably simpler to just break up the messages into tranches.
they aren't that big. its just a 16k JSON message


This thread makes me think that SC might even be happier over TCP:

http://stackoverflow.com/questions/47903/udp-vs-tcp-how-much-faster-is-it
Post by Hanns Holger Rutz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
TCP requires a server. SC-lang can be TCP client but not server. If
you set up a server, SC-lang can establish a connection using NetAddr
- -> connect.
Best, .h.h.
Post by felix
This should be very easy, but I've never actually done it. I always
use UDP.
but now my packet is too big and I wanted to try TCP. (UDP will not
report to the sender when a packet fails. any point in the network
can fail)
The NetAddr docs state that its opening a TCP connection, but its
actually all UDP.
Sending OSC via UDP to sclang is quite easy. you just open a datagram
UDP always sends messages with host and port. TCP is connection
based and needs to open a connection.
sclang refuses the connection. also does not accept telnet
connections.
error - ERROR:Error: connect ECONNREFUSED
sclang -h
-u <network-port-number> Set UDP listening port (default 57120)
so there's a UDP options, but no TCP options. Which suggests sclang
does not accept TCP connections at all and has no mechanism for
doing so.
So sclang is strictly UDP, but scsynth can be TCP and sclang can
connect to that over TCP. it can also connect to other apps over
TCP.
but it doesn't do incoming.
amirite ?
-- .. http://soundcloud.com/crucialfelix
http://github.com/crucialfelix .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUNwoeAAoJEKZFmaPaYk6Q1HgP/j1g9N6lDRTONgZ8yJl2k0Sf
Ea+esPh66nQiPxFq6vkVEE3m8WWBIzMdvXBSi66+le4zfS98sXvf19dUeQTzt+xq
WPV2yINXXcVARbG/fs7YWTPMmhUPBf5JvImyt03jBeyV7xz6TZt56GWV339ODVwB
8xNcdmoYZyceZX07dEbxSiPbhugsbHUZE7X9eFlySMG3X1/Dr6mzhwA55ESUGzLR
H3eF6drJqp7x5YGxjkEHHuFlaZRU4di5+QKS4TW4aPZ7GgRLl7nefsLl33De0+N9
mSIz6oGhFaiemaGBus/TldQvLqlfd2e7Slqf5KHDW33Z2Kwukvzmuy9UHpw/w+a4
JpQdV+43STtIQwXq2ojKqlPrL3z1Zhk5cJ2x7F3xDQG+LoAzRTMX6GktWYiSm5Ic
Z7DogIJKLcR3lfYDv6U5gVxb5uEWmH34HvKYRT+wUt4yqdX0W0uPhN1Poxm8c6lh
q5KLP1asdOq+bSeH5Du4e3SSe1nqcHJw1tTVs138dQHHoAKITPv5r+qdUUwXkpO1
1dqT5bynnxFWnS2yx2Up2hb7Yzfu72tzFTLNQG0Mp3pezfMWHtIEFibfFDDPiRQ5
1KMLnWBrxKT04EV3AViMqvdULSfeZapDOnk39iqazuXn51yyZRtr+2AfYY3A+MGI
oTe1j3+vAtX5io3zVXWO
=xrBS
-----END PGP SIGNATURE-----
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
felix
2014-10-09 22:50:13 UTC
Permalink
Ah cool, I was hoping you would respond. Thanks for the confirmation.

I pretty much figured that part out.
I could initiate a connection to nodejs from sclang.
Maybe send a UDP message telling it to connect back via TCP.

but its probably simpler to just break up the messages into tranches.
they aren't that big. its just a 16k JSON message


This thread makes me think that SC might even be happier over TCP:

http://stackoverflow.com/questions/47903/udp-vs-tcp-how-much-faster-is-it
Post by Hanns Holger Rutz
TCP requires a server. SC-lang can be TCP client but not server. If
you set up a server, SC-lang can establish a connection using NetAddr
- -> connect.
Best, .h.h.
--
..
http://soundcloud.com/crucialfelix
http://github.com/crucialfelix
.
Loading...