# _ProcessClient
<span class="source-link">[[Source]](src/process/_test.md#L367)</span>

Notifications for Process connections.


```pony
class ref _ProcessClient is
  ProcessNotify ref
```

#### Implements

* [ProcessNotify](process-ProcessNotify) ref

---

## Constructors

### create
<span class="source-link">[[Source]](src/process/_test.md#L380)</span>


```pony
new iso create(
  out: USize val,
  err: String val,
  exit_code: I32 val,
  h: TestHelper val)
: _ProcessClient iso^
```
#### Parameters

*   out: [USize](builtin-USize) val
*   err: [String](builtin-String) val
*   exit_code: [I32](builtin-I32) val
*   h: [TestHelper](ponytest-TestHelper) val

#### Returns

* [_ProcessClient](process-_ProcessClient) iso^

---

## Public Functions

### stdout
<span class="source-link">[[Source]](src/process/_test.md#L392)</span>


Called when new data is received on STDOUT of the forked process


```pony
fun ref stdout(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref
*   data: [Array](builtin-Array)\[[U8](builtin-U8) val\] iso

#### Returns

* [None](builtin-None) val

---

### stderr
<span class="source-link">[[Source]](src/process/_test.md#L408)</span>


Called when new data is received on STDERR of the forked process


```pony
fun ref stderr(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref
*   data: [Array](builtin-Array)\[[U8](builtin-U8) val\] iso

#### Returns

* [None](builtin-None) val

---

### failed
<span class="source-link">[[Source]](src/process/_test.md#L414)</span>


ProcessMonitor calls this if we run into errors with the
forked process.


```pony
fun ref failed(
  process: ProcessMonitor ref,
  err: (ExecveError val | ForkError val | KillError val | 
    PipeError val | Unsupported val | WaitpidError val | 
    WriteError val | CapError val))
: None val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref
*   err: ([ExecveError](process-ExecveError) val | [ForkError](process-ForkError) val | [KillError](process-KillError) val | 
    [PipeError](process-PipeError) val | [Unsupported](process-Unsupported) val | [WaitpidError](process-WaitpidError) val | 
    [WriteError](process-WriteError) val | [CapError](process-CapError) val)

#### Returns

* [None](builtin-None) val

---

### dispose
<span class="source-link">[[Source]](src/process/_test.md#L430)</span>


Called when ProcessMonitor terminates to cleanup ProcessNotify
We receive the exit code of the child process from ProcessMonitor.


```pony
fun ref dispose(
  process: ProcessMonitor ref,
  child_exit_code: I32 val)
: None val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref
*   child_exit_code: [I32](builtin-I32) val

#### Returns

* [None](builtin-None) val

---

### created
<span class="source-link">[[Source]](src/process/process_notify.md#L6)</span>


```pony
fun ref created(
  process: ProcessMonitor ref)
: None val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref

#### Returns

* [None](builtin-None) val

---

### expect
<span class="source-link">[[Source]](src/process/process_notify.md#L29)</span>


```pony
fun ref expect(
  process: ProcessMonitor ref,
  qty: USize val)
: USize val
```
#### Parameters

*   process: [ProcessMonitor](process-ProcessMonitor) ref
*   qty: [USize](builtin-USize) val

#### Returns

* [USize](builtin-USize) val

---

