# Interface OnReadOpts

interface OnReadOpts {
buffer: Uint8Array | (() => Uint8Array);
callback(bytesWritten, buf): boolean;
}

- Defined in node_modules/@types/node/net.d.ts:36

#####
Index

### Properties

buffer

### Methods

callback

## Properties

### buffer

buffer: Uint8Array | (() => Uint8Array)

#### Type declaration

- - (): Uint8Array

  - #### Returns Uint8Array

- Defined in node_modules/@types/node/net.d.ts:37

## Methods

### callback

- callback(bytesWritten, buf): boolean

- This function is called for every chunk of incoming data. Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. Return false from this function to implicitly pause() the socket.

  #### Parameters

  - bytesWritten: number
  - buf: Uint8Array

  #### Returns boolean

  - Defined in node_modules/@types/node/net.d.ts:43