> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client/ks.reactor.client.ksconnection/ks.reactor.client.ksconnection.iohandler.md).

# Delegate ksConnection.IOHandler

Namespace: [KS.Reactor.Client](/reactor/api-reference/ks.reactor.client.md)\
Assembly: KSUnity.dll

Handler called when a read/write operation completes.

```csharp
public delegate void ksConnection.IOHandler(ksConnection connection, ksStreamBuffer.Segment segment, SocketError error, object asyncState = null)
```

#### Parameters

`connection` [ksConnection](/reactor/api-reference/ks.reactor.client/ks.reactor.client.ksconnection.md)

connection that is calling the handler

`segment` [ksStreamBuffer](/reactor/api-reference/ks.reactor/ks.reactor.ksstreambuffer.md).[Segment](/reactor/api-reference/ks.reactor/ks.reactor.ksstreambuffer/ks.reactor.ksstreambuffer.segment.md)

buffer segment that was read from or written to

`error` [SocketError](https://learn.microsoft.com/dotnet/api/system.net.sockets.socketerror)

operation result

`asyncState` [object](https://learn.microsoft.com/dotnet/api/system.object)

asynchronous state
