ConnectionASendAndWaitForResponse Method (BinaryWriter, BinaryReader, Int32, Int32, String)
|
Sends data from sourceStream and writes the response data to destinationStream.
Namespace:
Zebra.Sdk.Comm
Assembly:
SdkApi_Core (in SdkApi_Core.dll) Version: 2.14.1989
Syntax public virtual void SendAndWaitForResponse(
BinaryWriter destinationStream,
BinaryReader sourceStream,
int initialResponseTimeout,
int responseCompletionTimeout,
string terminator
)
Public Overridable Sub SendAndWaitForResponse (
destinationStream As BinaryWriter,
sourceStream As BinaryReader,
initialResponseTimeout As Integer,
responseCompletionTimeout As Integer,
terminator As String
)
public:
virtual void SendAndWaitForResponse(
BinaryWriter^ destinationStream,
BinaryReader^ sourceStream,
int initialResponseTimeout,
int responseCompletionTimeout,
String^ terminator
)
Parameters
- destinationStream
- Type: System.IOBinaryWriter
Destination for response. - sourceStream
- Type: System.IOBinaryReader
Source of data to be sent. - initialResponseTimeout
- Type: SystemInt32
The maximum time, in milliseconds, to wait for the initial response to be received.
If no data is received during this time, the function does not write any data to the destination stream. - responseCompletionTimeout
- Type: SystemInt32
After the initial response, if no data is received for this period of time, the
input is considered complete and the method returns. - terminator
- Type: SystemString
If the response contains this string, the input is considered complete and the method returns.
May be used to avoid waiting for more data when the response is always terminated with a known string. Use null
if no terminator is desired.
Implements
ConnectionSendAndWaitForResponse(BinaryWriter, BinaryReader, Int32, Int32, String)Exceptions Remarks
The software returns immediately if the data received contains terminator. The connection must be open before this method
is called. If sendAndWaitForResponse is called when a connection is closed, a ConnectionException is thrown.
See Also