Skip to main content

callback

method OnReadOpts.callback
Jump to headingOnReadOpts.callback(
bytesWritten: number,
buffer: Uint8Array,
): 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 Jump to heading

Jump to headingbytesWritten: number
Jump to headingbuffer: Uint8Array

Return Type Jump to heading

boolean
Back to top