---
title: "SSLSetIOFuncs(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sslsetiofuncs(_:_:_:)"
---

# SSLSetIOFuncs(_:_:_:)

Specifies callback functions that perform the network I/O operations.

## Declaration

```swift
func SSLSetIOFuncs(_ context: SSLContext, _ readFunc: SSLReadFunc, _ writeFunc: SSLWriteFunc) -> OSStatus
```

## Parameters

- `context`: An SSL session context reference.
- `readFunc`: A pointer to your read callback function. See doc://com.apple.security/documentation/Security/SSLReadFunc for information on defining this function.
- `writeFunc`: A pointer to your write callback function. See doc://com.apple.security/documentation/Security/SSLWriteFunc for information on defining this function.

## Mentioned in

Using the Secure Socket Layer for Network Communication

## Return Value

Return Value A result code. See Secure Transport Result Codes.

## Discussion

Discussion Secure Transport calls your read and write callback functions to perform network I/O. You must define these functions before calling SSLSetIOFuncs(_:_:_:). You must call SSLSetIOFuncs(_:_:_:) prior to calling the SSLHandshake(_:) function. SSLSetIOFuncs(_:_:_:) cannot be called while a session is active.
