> 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.iooperation.md).

# Class ksConnection.IOOperation

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

Track read/write operations

```csharp
protected class ksConnection.IOOperation
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksConnection.IOOperation](/reactor/api-reference/ks.reactor.client/ks.reactor.client.ksconnection/ks.reactor.client.ksconnection.iooperation.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### IOOperation(SocketAsyncOperation, Segment, IOHandler, object) <a href="#ks_reactor_client_ksconnection_iooperation__ctor_system_net_sockets_socketasyncoperation_ks_reactor" id="ks_reactor_client_ksconnection_iooperation__ctor_system_net_sockets_socketasyncoperation_ks_reactor"></a>

Constructor.

```csharp
public IOOperation(SocketAsyncOperation type, ksStreamBuffer.Segment segment, ksConnection.IOHandler callback, object asyncState = null)
```

#### Parameters

`type` [SocketAsyncOperation](https://learn.microsoft.com/dotnet/api/system.net.sockets.socketasyncoperation)

Type of socket operation

`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)

Stream buffer segment to operate on

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

Callback to invoke when the operation completes

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

Async state object

## Fields

### AsyncState <a href="#ks_reactor_client_ksconnection_iooperation_asyncstate" id="ks_reactor_client_ksconnection_iooperation_asyncstate"></a>

```csharp
public object AsyncState
```

#### Field Value

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

### Callback <a href="#ks_reactor_client_ksconnection_iooperation_callback" id="ks_reactor_client_ksconnection_iooperation_callback"></a>

```csharp
public ksConnection.IOHandler Callback
```

#### Field Value

[ksConnection](/reactor/api-reference/ks.reactor.client/ks.reactor.client.ksconnection.md).[IOHandler](/reactor/api-reference/ks.reactor.client/ks.reactor.client.ksconnection/ks.reactor.client.ksconnection.iohandler.md)

### Processed <a href="#ks_reactor_client_ksconnection_iooperation_processed" id="ks_reactor_client_ksconnection_iooperation_processed"></a>

```csharp
public int Processed
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### Segment <a href="#ks_reactor_client_ksconnection_iooperation_segment" id="ks_reactor_client_ksconnection_iooperation_segment"></a>

```csharp
public ksStreamBuffer.Segment Segment
```

#### Field Value

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

### Total <a href="#ks_reactor_client_ksconnection_iooperation_total" id="ks_reactor_client_ksconnection_iooperation_total"></a>

```csharp
public int Total
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### Type <a href="#ks_reactor_client_ksconnection_iooperation_type" id="ks_reactor_client_ksconnection_iooperation_type"></a>

```csharp
public SocketAsyncOperation Type
```

#### Field Value

[SocketAsyncOperation](https://learn.microsoft.com/dotnet/api/system.net.sockets.socketasyncoperation)
