Multicast support

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
jeffreyscurtis
Posts: 1
Joined: Mon Feb 11, 2008 3:04 am

Multicast support

Post by jeffreyscurtis » Fri Feb 15, 2008 1:50 am

I would like to see native support for joining multicast groups.

Jeff

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Contact:

Re: Multicast support

Post by DarScott » Mon Apr 21, 2014 11:49 pm

Yeah. This would be nice. Any workarounds?

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Contact:

Re: Multicast support

Post by DarScott » Sun Apr 27, 2014 12:17 am

Maybe multicast can be supported with some sort of socket options enhancement. Or an enhancement of the 'accept' command. The first might be more general.

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Contact:

Re: Multicast support

Post by DarScott » Sat May 03, 2014 9:43 pm

Or maybe (as inspired by imagePixmapID), there could be a function to get the handle of the socket and this can be passed to an external.

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Contact:

Re: Multicast support

Post by DarScott » Wed May 14, 2014 6:23 am

Here is how it might be done without socket options:

An 'open datagram socket' is allowed to have an IP address in the multicast range. If a nonempty value is specified in defaultNetworkInterface then, it is set appropriately for the outgoing source socket. Loopback is enabled to allow receivers to be on the same computer. The TTL is left at 1; allowing use only in the local LAN. No syntax change is needed.

The 'accept datagram socket' command is enhanced to allow the optional clause 'from group <IP-address>'. This allows datagrams to be received from the specified multicast group. No other groups can be added for that port. No source list or source blocking is available.

Buffer sizes are set to at least the maximum size of a datagram socket in both cases.

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Contact:

Re: Multicast support

Post by DarScott » Fri Aug 15, 2014 11:46 pm

An alternative to the optional clause 'from group <ip address>' for accept is to allow an address:port pair where a port is used.

This it might be like this:

Code: Select all

accept datagram connections on port 239.9.4.211:5000 with message "gotDatagram"
One problem with that is that (as is) it looks the same in openSockets as a socket opened for sending datagrams to the multicast group.

The solution for that would be the same as that for the problem of accept datagram and accept for TCP looking the same in openSockets. Allowing an ID (connection name) suffix after a vertical bar (as is allowed with open socket) can make sure the accept and the open socket designators are distinct.

This might be simpler and easier to understand. It does not grow that well when multiple groups are added.

So, there are these two syntaxes to consider for enhancing accept datagram and the possibility of I/O properties in general or socket options in specific.

Post Reply