Reads all the available data from the connection. This call is non-blocking.
Namespace:
ZSDK_API.CommAssembly: ZSDK_API (in ZSDK_API.dll) Version: 1.1.123.0
Syntax
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
Exception | Condition |
---|---|
ZSDK_API.ApiException..::.ZebraPrinterConnectionException | If an I/O error occurs. |
ZSDK_API.ApiException..::.ZebraGeneralException | If the read could not be performed. |