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

# closeTransportConnection()

You must override this - it will be called when the transport connection should be shutdown.

```
func closeTransportConnection() -> OBEXError
```

## Return Value

Return whether or not the transport connection was closed successfully or not. Return OBEXSuccess ( 0 ) on success, otherwise an error code.

## Discussion

Tranport subclasses must override this! When called you should take whatever steps are necessary to actually close down the transport connection.

---

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)