Socket.SetMulticastInterface
----------------------------

Sets the interface to use for multicast.

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

MBS( "Socket.SetMulticastInterface"; SocketID; Interface ) 

**MBS**( **"Socket.SetMulticastInterface";** /\* Sets the interface to use for multicast. \*/  
**$SocketID**; /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/   
**$Interface**) /\* The IPv4 for the interface.e.g. "192.168.1.123" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |
| Interface | The IPv4 for the interface. | "192.168.1.123" |

### Result

Returns OK or error.

### Description

Sets the interface to use for multicast.  
If interface is empty text, we connect to all interfaces.  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.GetMulticastInterface](SocketGetMulticastInterface.md)
- [Socket.SetMulticastTimeToLive](SocketSetMulticastTimeToLive.md)

### Release notes

- **Version 7.5**
    - Added [Socket.GetMulticastInterface](http://www.mbsplugins.eu/SocketGetMulticastInterface.shtml) and [Socket.SetMulticastInterface](http://www.mbsplugins.eu/SocketSetMulticastInterface.shtml) functions for UDP Sockets.

### Blog Entries

- [MBS FileMaker Plugin, version 7.5pr3](https://www.mbsplugins.de/archive/2017-10-23/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th October 2017 , last changed 19th October 2017

  
[Socket.SetErrorURL](SocketSetErrorURL.md) - [Socket.SetMulticastLoop](SocketSetMulticastLoop.md)

[HTML Version](SocketSetMulticastInterface.shtml)