Reads all the available data from the connection. This call is non-blocking.

Namespace:  ZSDK_API.Comm
Assembly:  ZSDK_API (in ZSDK_API.dll) Version: 1.1.123.0

Syntax

C#
byte[] Read()
Visual Basic (Declaration)
Function Read As Byte()

Return Value

A byte array containing the data read from the connection.

Examples

This sample shows how to call the Read method.
CopyC#
TcpPrinterConnection connection = new TcpPrinterConnection(theIpAddress, TcpPrinterConnection.DEFAULT_ZPL_TCP_PORT);
connection.Open();
byte[] response = connection.Read();
CopyVB.NET
Dim connection As New TcpPrinterConnection(theIpAddress, TcpPrinterConnection.DEFAULT_ZPL_TCP_PORT)
connection.Open()
Dim response As Byte() = connection.Read()

Exceptions

ExceptionCondition
ZSDK_API.ApiException..::.ZebraPrinterConnectionExceptionIf an I/O error occurs.
ZSDK_API.ApiException..::.ZebraGeneralExceptionIf the read could not be performed.

See Also