<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/OBEXSessionPut",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:@F@OBEXSessionPut"
  },
  "title" : "OBEXSessionPut"
}
-->

# OBEXSessionPut

Send a put command to a remote OBEX server.

```
OBEXError OBEXSessionPut(OBEXSessionRef inSessionRef, Boolean inIsFinalChunk, void *inHeadersData, size_t inHeadersDataLength, void *inBodyData, size_t inBodyDataLength, OBEXSessionEventCallback inCallback, void *inUserRefCon);
```

## Parameters

`inSessionRef`

A valid session reference.

`inIsFinalChunk`

TRUE or FALSE - is this the last chunk of header data for this PUT.

`inHeadersData`

Headers containing data to PUT. Don’t include your body header data here.

`inHeadersDataLength`

Size of header data. Don’t include your body header data here.

`inBodyData`

Data for the BODY header to PUT. DO NOT package your data in an actual BODY header, this will be done for you, based on the finalChunk flag you pass in above (since based on this flag the header ID will be either a BODY or ENDOFBODY header).

`inBodyDataLength`

Size of Data for the BODY header to PUT.

`inCallback`

A valid callback. Will be called for progress, errors and completion.

`inUserRefCon`

Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

## Return Value

An error code value. 0 if successful.

## Discussion

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.

*** DEPRECATED IN BLUETOOTH 2.2 (OS X v10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)