---
title: "customCall(_:send:)"
framework: opendirectory
role: symbol
role_heading: Instance Method
path: "opendirectory/odnode/customcall(_:send:)"
---

# customCall(_:send:)

Returns the result of a custom call to the node.

## Declaration

```swift
func customCall(_ inCustomCode: Int, send inSendData: Data!) throws -> Data
```

## Parameters

- `inCustomCode`: The custom code to send to the node.
- `inSendData`: Data required by inCustomCode. Can be nil.

## Return Value

Return Value The result of the custom call.

## Discussion

Discussion note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Querying a Node

- [nodeDetails(forKeys:)](opendirectory/odnode/nodedetails(forkeys:).md)
- [nodeName](opendirectory/odnode/nodename.md)
- [subnodeNames()](opendirectory/odnode/subnodenames().md)
- [unreachableSubnodeNames()](opendirectory/odnode/unreachablesubnodenames().md)
