CURL.Upkeep
-----------

Perform any connection upkeep checks.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [8.5](newinversion85.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.Upkeep"; curl ) 

**MBS**( **"CURL.Upkeep";** /\* Perform any connection upkeep checks. \*/  
**$curl**) /\* The CURL session handle. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |

### Result

Returns OK or error.

### Description

Perform any connection upkeep checks.  
Some protocols have "connection upkeep" mechanisms. These mechanisms usually send some traffic on existing connections in order to keep them alive; this can prevent connections from being closed due to overzealous firewalls, for example.  
Currently the only protocol with a connection upkeep mechanism is HTTP/2: when the connection upkeep interval is exceeded and CURL.Upkeep is called, an HTTP/2 PING frame is sent on the connection.  
This function must be explicitly called in order to perform the upkeep work. The connection upkeep interval is set with [CURL.SetOptionUpkeepIntervalMS](CURLSetOptionUpkeepIntervalMS.md).  
### See also

- [CURL.SetOptionUpkeepIntervalMS](CURLSetOptionUpkeepIntervalMS.md)

### Release notes

- **Version 15.0**
    - Changed functions returning CURL errors to mark this as error, so [IsError](https://www.mbsplugins.eu/IsError.shtml) function returns true. This affects [CURL.Perform](https://www.mbsplugins.eu/CURLPerform.shtml), [CURL.FormClear](https://www.mbsplugins.eu/CURLFormClear.shtml), [CURL.FormFinish](https://www.mbsplugins.eu/CURLFormFinish.shtml), [CURL.Upkeep](https://www.mbsplugins.eu/CURLUpkeep.shtml), [CURL.SendText](https://www.mbsplugins.eu/CURLSendText.shtml), [CURL.SendData](https://www.mbsplugins.eu/CURLSendData.shtml), [CURL.PerformAsync](https://www.mbsplugins.eu/CURLPerformAsync.shtml), [CURL.WebSocketSend](https://www.mbsplugins.eu/CURLWebSocketSend.shtml), [CURL.WebSocketReceive](https://www.mbsplugins.eu/CURLWebSocketReceive.shtml), CURL.SetSocketNonBlocking, CURL.SetSocketNonBlocking, [SendMail.PrepareCURL](https://www.mbsplugins.eu/SendMailPrepareCURL.shtml) and various CURL.SetOption functions.
- **Version 8.5**
    - Added [CURL.SetOptionDOHURL](http://www.mbsplugins.eu/CURLSetOptionDOHURL.shtml), [CURL.SetOptionUpkeepIntervalMS](http://www.mbsplugins.eu/CURLSetOptionUpkeepIntervalMS.shtml), [CURL.SetOptionUploadBufferSize](http://www.mbsplugins.eu/CURLSetOptionUploadBufferSize.shtml) and [CURL.Upkeep](http://www.mbsplugins.eu/CURLUpkeep.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 15.0pr9](https://www.mbsplugins.de/archive/2025-01-10/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.5pr5](https://www.mbsplugins.de/archive/2018-11-02/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 31st October 2018 , last changed 31st October 2018

  
[CURL.SetupOAuth](CURLSetupOAuth.md) - [CURL.UseSystemCertificates](CURLUseSystemCertificates.md)

[HTML Version](CURLUpkeep.shtml)