<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/OBEXSession/setEventRefCon(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)OBEXSession(im)setEventRefCon:"
  },
  "title" : "setEventRefCon(_:)"
}
-->

# setEventRefCon(_:)

Sets the C-API callback refCon used when the session recieves data.

```
func setEventRefCon(_ inRefCon: UnsafeMutableRawPointer!)
```

## Parameters

`inRefCon`

User’s refCon that will get passed when their event callback is invoked.

## Discussion

This is really not intended for client sessions. Only subclasses would really be interested in using this. They should set these when their subclass object is created, because otherwise they will have no context in their callback.

---

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)