CommunicatorWaitFor(String, WaitingTerminateProc, CancellationToken) Method

Sends specified data and waits for the response. The waiting loop will be terminated if waitingTerminateProc returns true. If string data is empty, nothing is sent. Incomming chars are returned using parametr data (so data parameter cannot be null).

Definition

Namespace: OddPrg.Communication
Assembly: OddPrg.Communication (in OddPrg.Communication.dll) Version: 2.0.0.2 (2.0.0.2)
C#
public void WaitFor(
	ref string data,
	WaitingTerminateProc waitingTerminateProc,
	CancellationToken cancelToken
)

Parameters

data  String
Buffer for outgoing/incomming data. Characters are transformed by OutputEncoding before send and by InputEncoding after receive. This parameter cannot be null.
waitingTerminateProc  WaitingTerminateProc
Callback which will decide if all expected data are received
cancelToken  CancellationToken

See Also