Socket.SetTimeToLive
--------------------

Sets time to live for data packets.

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

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

**MBS**( **"Socket.SetTimeToLive";** /\* Sets time to live for data packets. \*/  
**$SocketID**; /\* The socket ID received by [Socket.Connect](SocketConnect.md) function.e.g. $sock \*/   
**$Value**) /\* The new time to live value.e.g. 5 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by [Socket.Connect](SocketConnect.md) function. | $sock |
| Value | The new time to live value. | 5 |

### Result

Returns OK or error.

### Description

Sets time to live for data packets.  
Range from 0 to 255.  
### See also

- [Socket.Connect](SocketConnect.md)
- [Socket.GetTimeToLive](SocketGetTimeToLive.md)

### 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 22nd August 2015

  
[Socket.SetTag](SocketSetTag.md) - [Socket.Write](SocketWrite.md)

[HTML Version](SocketSetTimeToLive.shtml)