You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
(7) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(7) |
| 2006 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(17) |
Nov
(18) |
Dec
(1) |
| 2007 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(6) |
Dec
(1) |
| 2008 |
Jan
(17) |
Feb
(20) |
Mar
(8) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(5) |
Aug
(6) |
Sep
(9) |
Oct
(19) |
Nov
(4) |
Dec
(35) |
| 2009 |
Jan
(40) |
Feb
(16) |
Mar
(7) |
Apr
(6) |
May
|
Jun
(5) |
Jul
(5) |
Aug
(4) |
Sep
(1) |
Oct
(2) |
Nov
(15) |
Dec
(15) |
| 2010 |
Jan
(5) |
Feb
(20) |
Mar
(12) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
(11) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
|
| 2011 |
Jan
(8) |
Feb
(19) |
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
(1) |
Sep
(21) |
Oct
(7) |
Nov
(4) |
Dec
|
| 2012 |
Jan
(3) |
Feb
(25) |
Mar
(8) |
Apr
(10) |
May
|
Jun
(14) |
Jul
(5) |
Aug
(12) |
Sep
(3) |
Oct
(14) |
Nov
|
Dec
|
| 2013 |
Jan
(10) |
Feb
(4) |
Mar
(10) |
Apr
(14) |
May
(6) |
Jun
(13) |
Jul
(37) |
Aug
(20) |
Sep
(11) |
Oct
(1) |
Nov
(34) |
Dec
|
| 2014 |
Jan
(8) |
Feb
(26) |
Mar
(24) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(28) |
Oct
(4) |
Nov
(4) |
Dec
(2) |
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(13) |
Jul
|
Aug
(3) |
Sep
(8) |
Oct
(11) |
Nov
(16) |
Dec
|
| 2016 |
Jan
|
Feb
(6) |
Mar
|
Apr
(9) |
May
(23) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
|
Jul
(3) |
Aug
|
Sep
(8) |
Oct
|
Nov
|
Dec
(3) |
| 2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(31) |
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
(2) |
5
(1) |
6
(2) |
7
|
8
|
|
9
|
10
(1) |
11
|
12
|
13
|
14
|
15
|
|
16
|
17
|
18
|
19
|
20
|
21
|
22
(1) |
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
|
31
|
|
|
|
|
|
|
From: Stephen S. <rad...@gm...> - 2020-08-22 18:50:58
|
I just added a few comments to lo_message_get_source() and lo_send_from() to try and clarify this. Not on the web yet, but if you check master on github you'll see it. Please let me know if anything could be clearer. https://github.com/radarsat1/liblo/blob/master/lo/lo.h.in#L136 https://github.com/radarsat1/liblo/blob/master/lo/lo_lowlevel.h#L311 Steve On Mon, Aug 10, 2020 at 11:44 AM Aigner Roland < rol...@fh...> wrote: > Hi Mark and Steve, > > > > All valid points! At least to me it was confusing, as I’m probably coming > from a slightly different angle (non-music, generic multimedia > installations). > > > > As you suggested, Steve, it’s maybe a good idea to shortly point it out in > the docs and/or code comments. I must admit, I never read the OSC specs in > detail, even though I’m using it for quite some time now. My bad, probably > would have helped. > > > > Best, > > Roland > > > > > > *From:* Mark Hotchkiss <Ma...@re...> > *Sent:* Thursday, August 6, 2020 10:26 PM > *To:* 'liblo development list' <lib...@li...> > *Subject:* Re: [liblo] how to connect to a liblo TCP OSC server? > > > > Hi Stephen and Roland, > > > > I interpreted "server" as a device that provides a service. In the context > of OSC, the server receives requests to provide music, rather than data. > > > > mark > > -----Original Message----- > *From:* Stephen Sinclair [mailto:rad...@gm... <rad...@gm...> > ] > *Sent:* Thursday, August 06, 2020 8:44 AM > *To:* liblo development list > *Subject:* Re: [liblo] how to connect to a liblo TCP OSC server? > > Ah right, you do make a good point ;) > > > > I believe the terminology choice in this case stems from "device accepting > connections" (like an HTTP server), as opposed to "device requesting > connections" (like an HTTP client). I can try to clarify that in the docs, > thanks. > > > > regards, > > Steve > > > > > > On Wed, Aug 5, 2020 at 5:59 PM Aigner Roland < > rol...@fh...> wrote: > > Hi Steve, > > > > Thanks for your detailed reply, that did indeed help. The cause for > confusion is in fact terminology and what I would associate with the term > “server” (i.e. a device providing data) and that the notation is apparently > different here (a device consuming data). > > > > Also thanks a ton for providing liblo as free software, it’s real helpful! > > > > Best, > > Roland > > > > > > > > *From:* Stephen Sinclair <rad...@gm...> > *Sent:* Tuesday, August 4, 2020 6:16 PM > *To:* liblo development list <lib...@li...> > *Subject:* Re: [liblo] how to connect to a liblo TCP OSC server? > > > > Hi Roland, > > > > > > On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland < > rol...@fh...> wrote: > > However I struggle to figure out how I would connect a client to this > server, i.e. what the code should look like for a client receiving the data > sent by this server. > > > > I'm not sure if your concept of client and server is mixed up here? In > OSC it is the client sending data to the server. > > > > Documentation and sample code leave me scratching my head, I tried to > figure out by checking the library source code, but so far I failed to > understand. From the fact that lo_send_message_from requires a target > address I infer that I would have to iterate through all connected clients > and sent to the respective sockets manually. > > > > You can get a target address by creating one, if you know the destination, > or you can get the sender's address from inside a message handler: > > > > lo_address a = lo_message_get_source(data); > > lo_send(a, "/hi", "i", 3); > > > > But how do I know when a client connection gets accepted? > > > > Who knows? The server knows because a handler is being executed. The > client only knows whether the send failed. > > > > > > So, summarizing, my two remaining questions are > > 1. how do I connect a client to the server? > > > > Your code (which I snipped from the message, apologies) is correct. You > just create a server and specify LO_TCP for its protocol, and a client > specifying LO_TCP for its protocol. Then the client should be able to make > a connection to the server and send it a message. > > > > > > > > 1. how do I know what clients are currently connected that I would > have to send my packages to? > > > > Hm, I don't think liblo provides a way to enumerate the current client > connections.. could be interesting, but it's not too usual to want to > broadcast to a random client. Usually messages from the server are limited > to _responses_ that are sent during message handlers, and in that case you > can get the response destination using lo_message_get_source as I outlined > above. > > > > Note that if your *client* wants to receive a response... actually it > cannot, it needs to set up a *server* to receive the response, and use > lo_send_from, specifying that server. That's how the destination server > can find where to send responses back to. So for bidirectional messaging, > each side has a server. > > > > If you need to broadcast a message to multiple servers, you can look into > multicast or broadcast messaging, but that's for UDP. > > > > As for sending a message to all currently connected clients, I'm not > sure.. I'll have to think on how to do that and whether it's a good idea. > Theoretically it is possible. > > > > Keep in mind that OSC is typically a UDP protocol and is designed around > one-way messaging. Liblo incidentally supports responses, but it's common > for UDP protocols to be unidirectional. > > On the TCP side, often clients will make a connection, send a message, > *maybe* wait for a response, and then close the connection. Long-lived > connections are more rarely used; but if they are, they shouldn't *depend* > on the connection state. > > > > Hope this helps, > > Steve > > > > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel > > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel > |
|
From: Aigner R. <rol...@fh...> - 2020-08-10 09:44:30
|
Hi Mark and Steve,
All valid points! At least to me it was confusing, as I’m probably coming from a slightly different angle (non-music, generic multimedia installations).
As you suggested, Steve, it’s maybe a good idea to shortly point it out in the docs and/or code comments. I must admit, I never read the OSC specs in detail, even though I’m using it for quite some time now. My bad, probably would have helped.
Best,
Roland
From: Mark Hotchkiss <Ma...@re...>
Sent: Thursday, August 6, 2020 10:26 PM
To: 'liblo development list' <lib...@li...>
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Hi Stephen and Roland,
I interpreted "server" as a device that provides a service. In the context of OSC, the server receives requests to provide music, rather than data.
mark
-----Original Message-----
From: Stephen Sinclair [mailto:rad...@gm...]
Sent: Thursday, August 06, 2020 8:44 AM
To: liblo development list
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Ah right, you do make a good point ;)
I believe the terminology choice in this case stems from "device accepting connections" (like an HTTP server), as opposed to "device requesting connections" (like an HTTP client). I can try to clarify that in the docs, thanks.
regards,
Steve
On Wed, Aug 5, 2020 at 5:59 PM Aigner Roland <rol...@fh...<mailto:rol...@fh...>> wrote:
Hi Steve,
Thanks for your detailed reply, that did indeed help. The cause for confusion is in fact terminology and what I would associate with the term “server” (i.e. a device providing data) and that the notation is apparently different here (a device consuming data).
Also thanks a ton for providing liblo as free software, it’s real helpful!
Best,
Roland
From: Stephen Sinclair <rad...@gm...<mailto:rad...@gm...>>
Sent: Tuesday, August 4, 2020 6:16 PM
To: liblo development list <lib...@li...<mailto:lib...@li...>>
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Hi Roland,
On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland <rol...@fh...<mailto:rol...@fh...>> wrote:
However I struggle to figure out how I would connect a client to this server, i.e. what the code should look like for a client receiving the data sent by this server.
I'm not sure if your concept of client and server is mixed up here? In OSC it is the client sending data to the server.
Documentation and sample code leave me scratching my head, I tried to figure out by checking the library source code, but so far I failed to understand. From the fact that lo_send_message_from requires a target address I infer that I would have to iterate through all connected clients and sent to the respective sockets manually.
You can get a target address by creating one, if you know the destination, or you can get the sender's address from inside a message handler:
lo_address a = lo_message_get_source(data);
lo_send(a, "/hi", "i", 3);
But how do I know when a client connection gets accepted?
Who knows? The server knows because a handler is being executed. The client only knows whether the send failed.
So, summarizing, my two remaining questions are
1. how do I connect a client to the server?
Your code (which I snipped from the message, apologies) is correct. You just create a server and specify LO_TCP for its protocol, and a client specifying LO_TCP for its protocol. Then the client should be able to make a connection to the server and send it a message.
1. how do I know what clients are currently connected that I would have to send my packages to?
Hm, I don't think liblo provides a way to enumerate the current client connections.. could be interesting, but it's not too usual to want to broadcast to a random client. Usually messages from the server are limited to _responses_ that are sent during message handlers, and in that case you can get the response destination using lo_message_get_source as I outlined above.
Note that if your client wants to receive a response... actually it cannot, it needs to set up a server to receive the response, and use lo_send_from, specifying that server. That's how the destination server can find where to send responses back to. So for bidirectional messaging, each side has a server.
If you need to broadcast a message to multiple servers, you can look into multicast or broadcast messaging, but that's for UDP.
As for sending a message to all currently connected clients, I'm not sure.. I'll have to think on how to do that and whether it's a good idea. Theoretically it is possible.
Keep in mind that OSC is typically a UDP protocol and is designed around one-way messaging. Liblo incidentally supports responses, but it's common for UDP protocols to be unidirectional.
On the TCP side, often clients will make a connection, send a message, maybe wait for a response, and then close the connection. Long-lived connections are more rarely used; but if they are, they shouldn't depend on the connection state.
Hope this helps,
Steve
_______________________________________________
liblo-devel mailing list
lib...@li...<mailto:lib...@li...>
https://lists.sourceforge.net/lists/listinfo/liblo-devel
|
|
From: Mark H. <Ma...@re...> - 2020-08-06 20:41:36
|
Hi Stephen and Roland,
I interpreted "server" as a device that provides a service. In the context
of OSC, the server receives requests to provide music, rather than data.
mark
-----Original Message-----
From: Stephen Sinclair [mailto:rad...@gm...]
Sent: Thursday, August 06, 2020 8:44 AM
To: liblo development list
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Ah right, you do make a good point ;)
I believe the terminology choice in this case stems from "device accepting
connections" (like an HTTP server), as opposed to "device requesting
connections" (like an HTTP client). I can try to clarify that in the docs,
thanks.
regards,
Steve
On Wed, Aug 5, 2020 at 5:59 PM Aigner Roland < rol...@fh...
<mailto:rol...@fh...> > wrote:
Hi Steve,
Thanks for your detailed reply, that did indeed help. The cause for
confusion is in fact terminology and what I would associate with the term
“server” (i.e. a device providing data) and that the notation is apparently
different here (a device consuming data).
Also thanks a ton for providing liblo as free software, it’s real helpful!
Best,
Roland
From: Stephen Sinclair < rad...@gm... <mailto:rad...@gm...> >
Sent: Tuesday, August 4, 2020 6:16 PM
To: liblo development list < lib...@li...
<mailto:lib...@li...> >
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Hi Roland,
On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland < rol...@fh...
<mailto:rol...@fh...> > wrote:
However I struggle to figure out how I would connect a client to this
server, i.e. what the code should look like for a client receiving the data
sent by this server.
I'm not sure if your concept of client and server is mixed up here? In OSC
it is the client sending data to the server.
Documentation and sample code leave me scratching my head, I tried to figure
out by checking the library source code, but so far I failed to understand.
>From the fact that lo_send_message_from requires a target address I infer
that I would have to iterate through all connected clients and sent to the
respective sockets manually.
You can get a target address by creating one, if you know the destination,
or you can get the sender's address from inside a message handler:
lo_address a = lo_message_get_source(data);
lo_send(a, "/hi", "i", 3);
But how do I know when a client connection gets accepted?
Who knows? The server knows because a handler is being executed. The
client only knows whether the send failed.
So, summarizing, my two remaining questions are
1. how do I connect a client to the server?
Your code (which I snipped from the message, apologies) is correct. You
just create a server and specify LO_TCP for its protocol, and a client
specifying LO_TCP for its protocol. Then the client should be able to make
a connection to the server and send it a message.
1. how do I know what clients are currently connected that I would have
to send my packages to?
Hm, I don't think liblo provides a way to enumerate the current client
connections.. could be interesting, but it's not too usual to want to
broadcast to a random client. Usually messages from the server are limited
to _responses_ that are sent during message handlers, and in that case you
can get the response destination using lo_message_get_source as I outlined
above.
Note that if your client wants to receive a response... actually it cannot,
it needs to set up a server to receive the response, and use lo_send_from,
specifying that server. That's how the destination server can find where to
send responses back to. So for bidirectional messaging, each side has a
server.
If you need to broadcast a message to multiple servers, you can look into
multicast or broadcast messaging, but that's for UDP.
As for sending a message to all currently connected clients, I'm not sure..
I'll have to think on how to do that and whether it's a good idea.
Theoretically it is possible.
Keep in mind that OSC is typically a UDP protocol and is designed around
one-way messaging. Liblo incidentally supports responses, but it's common
for UDP protocols to be unidirectional.
On the TCP side, often clients will make a connection, send a message, maybe
wait for a response, and then close the connection. Long-lived connections
are more rarely used; but if they are, they shouldn't depend on the
connection state.
Hope this helps,
Steve
_______________________________________________
liblo-devel mailing list
lib...@li... <mailto:lib...@li...>
https://lists.sourceforge.net/lists/listinfo/liblo-devel
<" rel="nofollow">https://lists.sourceforge.net/lists/listinfo/liblo-devel>
|
|
From: Stephen S. <rad...@gm...> - 2020-08-06 15:44:19
|
Ah right, you do make a good point ;) I believe the terminology choice in this case stems from "device accepting connections" (like an HTTP server), as opposed to "device requesting connections" (like an HTTP client). I can try to clarify that in the docs, thanks. regards, Steve On Wed, Aug 5, 2020 at 5:59 PM Aigner Roland <rol...@fh...> wrote: > Hi Steve, > > > > Thanks for your detailed reply, that did indeed help. The cause for > confusion is in fact terminology and what I would associate with the term > “server” (i.e. a device providing data) and that the notation is apparently > different here (a device consuming data). > > > > Also thanks a ton for providing liblo as free software, it’s real helpful! > > > > Best, > > Roland > > > > > > > > *From:* Stephen Sinclair <rad...@gm...> > *Sent:* Tuesday, August 4, 2020 6:16 PM > *To:* liblo development list <lib...@li...> > *Subject:* Re: [liblo] how to connect to a liblo TCP OSC server? > > > > Hi Roland, > > > > > > On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland < > rol...@fh...> wrote: > > However I struggle to figure out how I would connect a client to this > server, i.e. what the code should look like for a client receiving the data > sent by this server. > > > > I'm not sure if your concept of client and server is mixed up here? In > OSC it is the client sending data to the server. > > > > Documentation and sample code leave me scratching my head, I tried to > figure out by checking the library source code, but so far I failed to > understand. From the fact that lo_send_message_from requires a target > address I infer that I would have to iterate through all connected clients > and sent to the respective sockets manually. > > > > You can get a target address by creating one, if you know the destination, > or you can get the sender's address from inside a message handler: > > > > lo_address a = lo_message_get_source(data); > > lo_send(a, "/hi", "i", 3); > > > > But how do I know when a client connection gets accepted? > > > > Who knows? The server knows because a handler is being executed. The > client only knows whether the send failed. > > > > > > So, summarizing, my two remaining questions are > > 1. how do I connect a client to the server? > > > > Your code (which I snipped from the message, apologies) is correct. You > just create a server and specify LO_TCP for its protocol, and a client > specifying LO_TCP for its protocol. Then the client should be able to make > a connection to the server and send it a message. > > > > > > > > 1. how do I know what clients are currently connected that I would > have to send my packages to? > > > > Hm, I don't think liblo provides a way to enumerate the current client > connections.. could be interesting, but it's not too usual to want to > broadcast to a random client. Usually messages from the server are limited > to _responses_ that are sent during message handlers, and in that case you > can get the response destination using lo_message_get_source as I outlined > above. > > > > Note that if your *client* wants to receive a response... actually it > cannot, it needs to set up a *server* to receive the response, and use > lo_send_from, specifying that server. That's how the destination server > can find where to send responses back to. So for bidirectional messaging, > each side has a server. > > > > If you need to broadcast a message to multiple servers, you can look into > multicast or broadcast messaging, but that's for UDP. > > > > As for sending a message to all currently connected clients, I'm not > sure.. I'll have to think on how to do that and whether it's a good idea. > Theoretically it is possible. > > > > Keep in mind that OSC is typically a UDP protocol and is designed around > one-way messaging. Liblo incidentally supports responses, but it's common > for UDP protocols to be unidirectional. > > On the TCP side, often clients will make a connection, send a message, > *maybe* wait for a response, and then close the connection. Long-lived > connections are more rarely used; but if they are, they shouldn't *depend* > on the connection state. > > > > Hope this helps, > > Steve > > > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel > |
|
From: Aigner R. <rol...@fh...> - 2020-08-05 15:59:29
|
Hi Steve,
Thanks for your detailed reply, that did indeed help. The cause for confusion is in fact terminology and what I would associate with the term “server” (i.e. a device providing data) and that the notation is apparently different here (a device consuming data).
Also thanks a ton for providing liblo as free software, it’s real helpful!
Best,
Roland
From: Stephen Sinclair <rad...@gm...>
Sent: Tuesday, August 4, 2020 6:16 PM
To: liblo development list <lib...@li...>
Subject: Re: [liblo] how to connect to a liblo TCP OSC server?
Hi Roland,
On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland <rol...@fh...<mailto:rol...@fh...>> wrote:
However I struggle to figure out how I would connect a client to this server, i.e. what the code should look like for a client receiving the data sent by this server.
I'm not sure if your concept of client and server is mixed up here? In OSC it is the client sending data to the server.
Documentation and sample code leave me scratching my head, I tried to figure out by checking the library source code, but so far I failed to understand. From the fact that lo_send_message_from requires a target address I infer that I would have to iterate through all connected clients and sent to the respective sockets manually.
You can get a target address by creating one, if you know the destination, or you can get the sender's address from inside a message handler:
lo_address a = lo_message_get_source(data);
lo_send(a, "/hi", "i", 3);
But how do I know when a client connection gets accepted?
Who knows? The server knows because a handler is being executed. The client only knows whether the send failed.
So, summarizing, my two remaining questions are
1. how do I connect a client to the server?
Your code (which I snipped from the message, apologies) is correct. You just create a server and specify LO_TCP for its protocol, and a client specifying LO_TCP for its protocol. Then the client should be able to make a connection to the server and send it a message.
1. how do I know what clients are currently connected that I would have to send my packages to?
Hm, I don't think liblo provides a way to enumerate the current client connections.. could be interesting, but it's not too usual to want to broadcast to a random client. Usually messages from the server are limited to _responses_ that are sent during message handlers, and in that case you can get the response destination using lo_message_get_source as I outlined above.
Note that if your client wants to receive a response... actually it cannot, it needs to set up a server to receive the response, and use lo_send_from, specifying that server. That's how the destination server can find where to send responses back to. So for bidirectional messaging, each side has a server.
If you need to broadcast a message to multiple servers, you can look into multicast or broadcast messaging, but that's for UDP.
As for sending a message to all currently connected clients, I'm not sure.. I'll have to think on how to do that and whether it's a good idea. Theoretically it is possible.
Keep in mind that OSC is typically a UDP protocol and is designed around one-way messaging. Liblo incidentally supports responses, but it's common for UDP protocols to be unidirectional.
On the TCP side, often clients will make a connection, send a message, maybe wait for a response, and then close the connection. Long-lived connections are more rarely used; but if they are, they shouldn't depend on the connection state.
Hope this helps,
Steve
|
|
From: Stephen S. <rad...@gm...> - 2020-08-04 16:16:14
|
Hi Roland,
On Tue, Aug 4, 2020 at 1:36 PM Aigner Roland <rol...@fh...>
wrote:
> However I struggle to figure out how I would connect a client to this
> server, i.e. what the code should look like for a client receiving the data
> sent by this server.
>
I'm not sure if your concept of client and server is mixed up here? In OSC
it is the client sending data to the server.
Documentation and sample code leave me scratching my head, I tried to
> figure out by checking the library source code, but so far I failed to
> understand. From the fact that lo_send_message_from requires a target
> address I infer that I would have to iterate through all connected clients
> and sent to the respective sockets manually.
>
You can get a target address by creating one, if you know the destination,
or you can get the sender's address from inside a message handler:
lo_address a = lo_message_get_source(data);
lo_send(a, "/hi", "i", 3);
> But how do I know when a client connection gets accepted?
>
Who knows? The server knows because a handler is being executed. The
client only knows whether the send failed.
> So, summarizing, my two remaining questions are
>
> 1. how do I connect a client to the server?
>
>
Your code (which I snipped from the message, apologies) is correct. You
just create a server and specify LO_TCP for its protocol, and a client
specifying LO_TCP for its protocol. Then the client should be able to make
a connection to the server and send it a message.
>
>
> 1. how do I know what clients are currently connected that I would
> have to send my packages to?
>
>
Hm, I don't think liblo provides a way to enumerate the current client
connections.. could be interesting, but it's not too usual to want to
broadcast to a random client. Usually messages from the server are limited
to _responses_ that are sent during message handlers, and in that case you
can get the response destination using lo_message_get_source as I outlined
above.
Note that if your *client* wants to receive a response... actually it
cannot, it needs to set up a *server* to receive the response, and use
lo_send_from, specifying that server. That's how the destination server
can find where to send responses back to. So for bidirectional messaging,
each side has a server.
If you need to broadcast a message to multiple servers, you can look into
multicast or broadcast messaging, but that's for UDP.
As for sending a message to all currently connected clients, I'm not sure..
I'll have to think on how to do that and whether it's a good idea.
Theoretically it is possible.
Keep in mind that OSC is typically a UDP protocol and is designed around
one-way messaging. Liblo incidentally supports responses, but it's common
for UDP protocols to be unidirectional.
On the TCP side, often clients will make a connection, send a message,
*maybe* wait for a response, and then close the connection. Long-lived
connections are more rarely used; but if they are, they shouldn't *depend*
on the connection state.
Hope this helps,
Steve
|
|
From: Aigner R. <rol...@fh...> - 2020-08-04 11:36:10
|
Hi everyone, I'm using the lowlevel API with UDP for unidirectional OSC for some time now and for my current use case I'm trying now to switch to TCP. However, I'm having trouble understanding how to use the library. The example_tcp_echo_server demonstrates how to set up a server and I tried to replicate this. Basically, the way I got it, I have to do this: //setup server to listen at localhost:7000 _tcpThread = lo_server_thread_new_with_proto( "7000", LO_TCP, errorHandler ); _tcpServer = lo_server_thread_get_server( _tcpThread ); lo_server_thread_start( _tcpThread ); //send to client at localhost:7001 _address = lo_address_new_with_proto( LO_TCP, "127.0.0.1", "7001" ); lo_send_message_from( _address, _tcpServer, "/test", message ); However I struggle to figure out how I would connect a client to this server, i.e. what the code should look like for a client receiving the data sent by this server. Documentation and sample code leave me scratching my head, I tried to figure out by checking the library source code, but so far I failed to understand. From the fact that lo_send_message_from requires a target address I infer that I would have to iterate through all connected clients and sent to the respective sockets manually. But how do I know when a client connection gets accepted? So, summarizing, my two remaining questions are 1. how do I connect a client to the server? 2. how do I know what clients are currently connected that I would have to send my packages to? Thanks, Roland |