Socket.SetMulticastLoop
-----------------------

Sets whether multicast packets are also sent to the sending socket.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Socket](component_Socket.md) | [5.3](newinversion53.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Socket.SetMulticastLoop"; SocketID; Value ) 

**MBS**( **"Socket.SetMulticastLoop";** /\* Sets whether multicast packets are also sent to the sending socket. \*/  
**$SocketID**; /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/   
**$Value**) /\* The new setting. Either 1 to loop or 0 to not loop.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |
| Value | The new setting. Either 1 to loop or 0 to not loop. | 1 |

### Result

Returns OK or error.

### Description

Sets whether multicast packets are also sent to the sending socket.  
### Examples

Enable multicast loop:

 Set Variable \[$r ; Value:MBS ("Socket.SetMulticastLoop"; $$sock ; 0)\]  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.GetMulticastLoop](SocketGetMulticastLoop.md)
- [Socket.NewUDPSocket](SocketNewUDPSocket.md)

### Example Databases

- [Network/UDP/UDP Broadcast](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Network/UDP/UDP%20Broadcast.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 5.3pr1](https://www.mbsplugins.de/archive/2015-08-26/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd August 2015 , last changed 26th January 2016

  
[Socket.SetMulticastInterface](SocketSetMulticastInterface.md) - [Socket.SetMulticastTimeToLive](SocketSetMulticastTimeToLive.md)

[HTML Version](SocketSetMulticastLoop.shtml)