CommunicatorDispatch Method

Call this method from a data receive handler to accept new incoming data and to add them to the receive buffer and test if all data are received.

Definition

Namespace: OddPrg.Communication
Assembly: OddPrg.Communication (in OddPrg.Communication.dll) Version: 2.0.0.2 (2.0.0.2)
C#
public bool Dispatch(
	byte[] buffer,
	int bytesRead,
	CancellationToken cancelToken
)

Parameters

buffer  Byte
Incoming data to add to receive buffer.
bytesRead  Int32
Count of bytes in buffer that are available. It is expected to be greater than zero.
cancelToken  CancellationToken

Return Value

Boolean
True if all expected data were received otherwise False.

See Also